|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectvitro.grid.GridAction
vitro.grid.CreateAction
public class CreateAction
A CreateAction encapsulates the process of spawning a new Actor at a specified location. Note that if two CreateActions are created with references to the same "spawned" Actor and then both applied, goofy things can happen.
Field Summary | |
---|---|
Actor |
actor
The Actor that will be spawned. |
Location |
location
The Location at which to spawn an Actor. |
Fields inherited from class vitro.grid.GridAction |
---|
model |
Constructor Summary | |
---|---|
CreateAction(Grid model,
Location location,
Actor actor)
Create a new CreateAction. |
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 location
public final Actor actor
Constructor Detail |
---|
public CreateAction(Grid model, Location location, Actor actor)
model
- the Grid in which to spawn an Actor.location
- the location at which to spawn the Actor.actor
- the Actor to spawn.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 |