Is there a way to determine the type of collection?
If I have the following:
private Map<String, A> myMap;
that is, a way to define Map<String, A>as a new type MapOfTypeA, for example, so that I can define myMap as
private MapOfTypeA myMap;
as an extension of this, is there a way to have the following:
myMap = new MapOfTypeA();
really
myMap = new HashMap<String, A>();
I'm not sure what to call what I ask, but I think I explained it. I think in C or C ++ this will be a typedef.
source
share