Skip to content

Commit f1d96b6

Browse files
Ranga Rao KaranamRanga Rao Karanam
authored andcommitted
More information in Readme
1 parent 265ed9a commit f1d96b6

File tree

1 file changed

+39
-1
lines changed

1 file changed

+39
-1
lines changed

readme.md

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,45 @@ obj2.hashCode(). Two unequal objects MIGHT have the same hashCode.
360360
- TODO
361361

362362
##Examples of Design Patterns used in Java
363-
- TODO
363+
364+
###Some Creational patterns
365+
- Factory method
366+
- java.util.Calendar#getInstance()
367+
- java.nio.charset.Charset#forName()
368+
- Prototype
369+
- java.lang.Object#clone()
370+
- Singleton
371+
- java.lang.Runtime#getRuntime()
372+
- java.lang.System#getSecurityManager()
373+
374+
###Some Structural patterns
375+
- Adapter
376+
- java.util.Arrays#asList()
377+
- javax.xml.bind.annotation.adapters.XmlAdapter#marshal() and #unmarshal()
378+
379+
- Decorator
380+
- All subclasses of java.io.InputStream, OutputStream etc.
381+
- java.util.Collections : synchronizedXXX() and unmodifiableXXX() methods.
382+
383+
- Flyweight
384+
- java.lang.Integer#valueOf(int) (also on other Wrapper classes)
385+
386+
###Behavioral patterns
387+
- Chain of responsibility
388+
- javax.servlet.Filter#doFilter()
389+
- Exception Handling
390+
391+
- Command
392+
- java.lang.Runnable
393+
394+
- Iterator
395+
- All implementations of java.util.Iterator
396+
397+
- Strategy (recognizeable by behavioral methods in an abstract/interface type which invokes a method in an implementation of a different abstract/interface type which has been passed-in as method argument into the strategy implementation)
398+
- java.util.Comparator#compare(), executed by among others Collections#sort().
399+
400+
- Template method (recognizeable by behavioral methods which already have a "default" behaviour definied by an abstract type)
401+
- All non-abstract methods of java.util.AbstractList, java.util.AbstractSet and java.util.AbstractMap.
364402

365403
##Reflection
366404
- TODO

0 commit comments

Comments
 (0)