Code:
public class TypeSafeHetrogenousExample {


       public static void main(String[] args) {


               List<String> stooges = Arrays.asList("Larry", "Moe",
"Curly");
               List<Integer> fibs = Arrays.asList(1, 1, 2, 3, 5, 8 );

               f.setFavorite(List<String>.class, Stooges);
               f.setFavorite(List<Integer>.class, fibs);

               String s = f.getFavorite(List<String>.class);
               int i = f.getFavorite(List<Integer>.class);

               if(i==0) {
                       System.out.println("expected");
               }else {
                       System.out.println("not sure.");
               }
       }
}