Java Generics code samples