|
|
Browse by Tags
All Tags » Java 5 » generics (RSS)
-
I think I had a similar problem. And I believe it has to do with how Generics work in Java:
The Generic method match(T) is not compiled into an actual method match(ActualClass) for a specific ActualClass. Generics can only do type checking at compile time! At Runtime, the method will not know about the actual class anymore: it will basically be ...
-
I have a class with a generic attribute
public class SimplePerson<V extends Comparable> implements Serializable, SimplePersonIf {
private static final long serialVersionUID = 1L;
private String name;
private List<SimplePersonIf> friends;
private V value;
When I store an object, the attribute ''value'' is not ...
|
|
|