I have a generic class "Property" that I want to put in a HashMap, but I get an "Unexpected token: >"
error.
I'm using Processing 2.2.1.
class MouseEvent extends Event{
HashMap<String, Property> Args;
MouseEvent(String type){
Args = new HashMap<String, Property>();
Args.put("mouseX", new Property<int>(mouseX)); //throws unexpected token
Args.put("mouseY", new Property<int>(mouseY));
Args.put("Button", new Property<int>(mouseButton));
Args.put("Type", new Property<String>(type));
}
}
class Property<T>{
private T val;
Poperty(T v){
val = v;
}
void Set(T v){
val = v;
}
T Get(){
return val;
}
}
What am I misunderstanding here? :/