Implement a Generic Type
Eg. MyClassComparator implements Comparator<MyClass>
Pass up a Type Parameter
Eg. Reverse<T> implements Comparator<T>
Type Bounds
Ex. SortedMyClass < T extends Comparable <T>>
SortedMyClass will received only a class that will be comparable with itself
Generics on Methods
Eg.- public static <T> T myMethod ( List<T> , Compartor<T>)
<T> - Indicate that the method will return a generic
T - Indicate that the method is generic
Comentarios
Publicar un comentario