rails.game.move
Class SetChange<E>
java.lang.Object
rails.game.move.Move
rails.game.move.SetChange<E>
public class SetChange<E>
- extends Move
This Move class handles the addition or removal of set elements
- Author:
- Stefan Frey
Constructor Summary |
SetChange(java.util.Set<E> set,
E element,
boolean addToSet)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
set
protected java.util.Set<E> set
element
protected E element
addToSet
protected boolean addToSet
noChange
protected boolean noChange
SetChange
public SetChange(java.util.Set<E> set,
E element,
boolean addToSet)
execute
public boolean execute()
- Specified by:
execute
in class Move
undo
public boolean undo()
- Specified by:
undo
in class Move
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object