|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjfreerails.move.AddItemToSharedListMove
public class AddItemToSharedListMove
All moves that add an item to a shared list should extend this class.
| Field Summary | |
|---|---|
private int |
index
|
private FreerailsSerializable |
item
|
private SKEY |
listKey
|
private static long |
serialVersionUID
|
| Constructor Summary | |
|---|---|
protected |
AddItemToSharedListMove(SKEY key,
int i,
FreerailsSerializable item)
|
| Method Summary | |
|---|---|
MoveStatus |
doMove(World w,
FreerailsPrincipal p)
Executes this move on the specifed world object. |
boolean |
equals(java.lang.Object o)
|
FreerailsSerializable |
getAfter()
|
FreerailsSerializable |
getBefore()
|
int |
getIndex()
|
SKEY |
getKey()
|
int |
hashCode()
|
java.lang.String |
toString()
|
MoveStatus |
tryDoMove(World w,
FreerailsPrincipal p)
Tests whether this Move can be executed on the specifed world object, this method should leave the world object unchanged. |
MoveStatus |
tryUndoMove(World w,
FreerailsPrincipal p)
Tests whether this Move can be undone on the specifed world object, this method should leave the world object unchanged. |
MoveStatus |
undoMove(World w,
FreerailsPrincipal p)
If doMove has just been executed on the specified world
object, calling this method changes the state of the world object back to
how it was before doMove was called. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private static final long serialVersionUID
private final SKEY listKey
private final int index
private final FreerailsSerializable item
| Constructor Detail |
|---|
protected AddItemToSharedListMove(SKEY key,
int i,
FreerailsSerializable item)
| Method Detail |
|---|
public int getIndex()
public int hashCode()
hashCode in class java.lang.Objectpublic SKEY getKey()
public MoveStatus tryDoMove(World w,
FreerailsPrincipal p)
Move
tryDoMove in interface Move
public MoveStatus tryUndoMove(World w,
FreerailsPrincipal p)
Move
tryUndoMove in interface Move
public MoveStatus doMove(World w,
FreerailsPrincipal p)
Move
doMove in interface Move
public MoveStatus undoMove(World w,
FreerailsPrincipal p)
MovedoMove has just been executed on the specified world
object, calling this method changes the state of the world object back to
how it was before doMove was called.
undoMove in interface Movepublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic FreerailsSerializable getBefore()
public FreerailsSerializable getAfter()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||