import java.util.*; /* * test case fodder for basic generic signature matching */ public class GenericMethods { public List returningListOfInteger() { return new LinkedList(); } public List returningListOfObject() { return new LinkedList(); } public List returningRawList() { return new ArrayList(); } public LinkedList returningSubtypeOfListOfInteger() { return new LinkedList(); } public void takesAMap(Map aMap) {} public void takesAHashmap(HashMap aMap) {} public static void staticTakesAMap(Map aMap) {} public void collectionOfAnything(Collection aCollection) {} public void collectionOfAnyNumber(Collection aNumberCollection) {} public void collectionOfAnythingTakingADouble(Collection aDoubleHandlingCollection) {} // now some fun with statics static T findMax(List ts) { return ts.get(0); } static > T betterMax(Collection collection) { return null; } static > T evenBetterMax(Collection coll) { return null; } static > T jdkMax(Collection coll) { return null; } static void copy(List dest, List src) {} static copyv2(List dest, List src) {} }