I want to develope a class in java. The problem is that the constructor doesn't work
The class is this:
public class EnumSetPlus<E extends Enum<E>> {
//Map
private EnumSet<E> map;
//Constructor
public EnumSetPlus(){
}
I want to inicializate the map with EnumSet.noneOf(E.class)
but the constructor gives an error.
Is the constructor wrong?. Can I initialize the variable map without a constructor?.
I have tried public EnumSetPlus<<E extends Enum<E>>> = EnumSet.noneOf(E)
in the variable context, but it doesn't work.
I have tried map = EnumSet.noneOf(E.class)
into the constructor too, but neither it works.
I think it's a problem with the syntax or with the method
could you help me?
Thanks beforehand!