I'm looking for some code and API's that would show use use of generic in larger scheme of things.
Asked
Active
Viewed 228 times
3 Answers
4
The question is a bit vague. Generics doesn't add anything to design patterns. They just adds compile time type safety to your code.
Probably your question needs to be reformulated as "What are useful API's for/with generics?". In that case, the Java Collections API and Java Concurrent API have nice examples.

BalusC
- 1,082,665
- 372
- 3,610
- 3,555
2
For some real-world examples, check out the Java Collections framework trail. It's a pretty sane implementation, all things considered.

Steven Schlansker
- 37,580
- 14
- 81
- 100
-
I would focus less on "design patterns" as generics are focused more on type safety. – Steven Schlansker Dec 11 '10 at 20:27
0
You can have a look at this great post with examples of GoF design-patterns as they appear in Java SE and Java EE.

Community
- 1
- 1

dimitrisli
- 20,895
- 12
- 59
- 63
-
Have a look at the ones referring to java.util Collection/List/Set/Map and their subtypes. – dimitrisli Dec 11 '10 at 03:03