I have an interface in java, called Action and has no functions
I also have an interface in java called State which has this function
public Set<Action> getPossibleActions();
I have this enum
public enum Movement implements Action{...}
and this class
public class Tiles implements search.State{
which implements the function
public Set<Movement> getPossibleActions() {...}
Set<Movement> movements = new LinkedHashSet<Movement>();
...
}
return movements;
}
Why my last function does not work? I get the message that the return type is incompatible with the function public Set getPossibleActions();
As I set my class Movement to implement interface Action, my Movement isn't an Action? Therefore it should work... What I am doing wrong?
How do I solve that?