|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.vizzini.game.action.AbstractAction
org.vizzini.game.boardgame.action.AbstractGridBoardAction
org.vizzini.game.boardgame.action.PlaceAction
public class PlaceAction
Provides an action for placement of a token on a grid board.
Constructor Summary | |
---|---|
protected |
PlaceAction(IGridBoard gridBoard,
IAgent agent,
IntegerPosition position,
Class tokenClass)
Construct this object. |
Method Summary | |
---|---|
void |
clear()
Clear the properties of this object. |
boolean |
doIt()
Perform the command encapsulated by this object. |
boolean |
equals(Object object)
Return true if the given object is equal to this. |
static PlaceAction |
get(IGridBoard gridBoard,
IAgent agent,
IntegerPosition position,
Class tokenClass)
Return an instance of this class using the given parameters. |
Class |
getTokenClass()
|
int |
hashCode()
Returns a hash code value for the object. |
static void |
poolReport()
Log a statistics report. |
void |
release()
Return this instance to the reusable object pool. |
protected void |
set(IGridBoard gridBoard,
IAgent agent,
IntegerPosition position,
Class tokenClass)
Set parameters on this object. |
protected void |
setTokenClass(Class tokenClass)
|
String |
toString()
Return a string representation of this object. |
boolean |
undoIt()
Undo the last invocation of doIt. |
Methods inherited from class org.vizzini.game.boardgame.action.AbstractGridBoardAction |
---|
getGridBoard, getToPosition, prettyPrint, setGridBoard, setToPosition |
Methods inherited from class org.vizzini.game.action.AbstractAction |
---|
compareTo, getAgent, getRating, setAgent, setRating |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.vizzini.game.action.IAction |
---|
getAgent, getRating, setAgent, setRating |
Methods inherited from interface java.lang.Comparable |
---|
compareTo |
Constructor Detail |
---|
protected PlaceAction(IGridBoard gridBoard, IAgent agent, IntegerPosition position, Class tokenClass)
Method Detail |
---|
public static PlaceAction get(IGridBoard gridBoard, IAgent agent, IntegerPosition position, Class tokenClass)
public static void poolReport()
public void clear()
clear
in interface IAction
clear
in class AbstractGridBoardAction
public boolean doIt()
doIt
in interface IAction
doIt
in class AbstractAction
public boolean equals(Object object)
equals
in interface IAction
equals
in class AbstractGridBoardAction
object
- The object to compare.public Class getTokenClass()
public int hashCode()
hashCode
in interface IAction
hashCode
in class AbstractGridBoardAction
public void release()
release
in interface IAction
release
in class AbstractAction
public String toString()
toString
in class AbstractAction
public boolean undoIt()
undoIt
in interface IAction
undoIt
in class AbstractAction
protected void set(IGridBoard gridBoard, IAgent agent, IntegerPosition position, Class tokenClass)
protected void setTokenClass(Class tokenClass)
tokenClass
- The tokenClass to set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2007 Vizzini.org. All Rights Reserved. | 2007.12.25.03.00.02 |