0

I'm looking for some code and API's that would show use use of generic in larger scheme of things.

MatBanik
  • 26,356
  • 39
  • 116
  • 178

3 Answers3

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
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