I've been trying to do this for a little while and it's driving me crazy. I have an EnumMap where I have some enumeration as a key and an arraylist of a self-defined class as the value. So it looks something like this:
private EnumMap<myEnum,List<myObj>> map =
new EnumMap<myEnum,List<myObj>>(myEnum.class);
This keeps giving me an error. Not sure exactly what's happening.
EDIT: Yes, myEnum is an enum class. My mistake, I should have mentioned what error is and where it happens. The error occurs when I do the following:
hand.put(myEnum.someEnum, new ArrayList());
The error I get is: - Syntax error on tokens, TypeArgument1 expected instead - Syntax error on token "(", < expected - Syntax error on token "new", delete this token