private Map<Class<?>, Object> favorites = new HashMap<Class<?>, Object>();
public <T> void putFavorite(Class<T> type, T instance) {
//code to put the T Object in the Map
}
I saw this code in a talk from Joshua Bloch on UserGroupsAtGoogle
link: http://www.youtube.com/watch?v=V1vQf4qyMXg
I wonder what this <T> means in the method declaration of the putFavorite method.
I assume, this is not the return value, because this is already void.