rails.game.move
Class DoubleMapChange<K1,K2,V>
java.lang.Object
rails.game.move.Move
rails.game.move.DoubleMapChange<K1,K2,V>
public class DoubleMapChange<K1,K2,V>
- extends Move
This Move class handles adding an entry to a 2-D Map (a Map of Maps, or a
matrix). An Undo will remove the second key, but not the first key.
- Author:
- Erik Vos
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
map
protected java.util.HashMap<K1,java.util.HashMap<K2,V>> map
firstKey
protected K1 firstKey
secondKey
protected K2 secondKey
value
protected V value
DoubleMapChange
public DoubleMapChange(java.util.HashMap<K1,java.util.HashMap<K2,V>> map,
K1 firstKey,
K2 secondKey,
V value)
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