|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectvitro.grid.GridAction
vitro.grid.MoveAction
public class MoveAction
A MoveAction encapsulates the process of Moving an Actor from one Location to another.
Field Summary | |
---|---|
Actor |
actor
The Actor that is moved. |
Location |
end
The final Location of the Actor. |
Location |
start
The initial Location of the Actor. |
Fields inherited from class vitro.grid.GridAction |
---|
model |
Constructor Summary | |
---|---|
MoveAction(Grid model,
Location destination,
Actor actor)
Create a new MoveAction. |
Method Summary | |
---|---|
void |
apply()
Apply this Action. |
boolean |
equals(Object o)
|
int |
hashCode()
|
String |
toString()
|
void |
undo()
Roll back this Action. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final Location start
public final Location end
public final Actor actor
Constructor Detail |
---|
public MoveAction(Grid model, Location destination, Actor actor)
model
- the Grid within which to move an Actor.destination
- the Location to which the Actor will be moved.actor
- the Actor to move.Method Detail |
---|
public void apply()
public void undo()
public int hashCode()
hashCode
in class Object
public boolean equals(Object o)
equals
in class Object
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |