|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.vizzini.util.AbstractCollection
org.vizzini.game.TokenArrayCollection
org.vizzini.game.boardgame.chess.ChessTokenCollection
public class ChessTokenCollection
Provides a token collection for chess tokens. Extends the superclass to provide quick access to the Kings.
Constructor Summary | |
---|---|
ChessTokenCollection()
|
Method Summary | |
---|---|
boolean |
add(Object object)
Add the given object. |
void |
clear()
Removes all of the objects from this collection. |
Object |
clone()
Return a clone of this instance. |
IToken |
get(Class tokenType,
IAgent agent0)
Return the first token found of the given type belonging to the given agent. |
protected IAgent |
getAgent(boolean isWhite)
Return the agent for the given parameter. |
IKing |
getKing(boolean isWhite)
Return the King for the given parameter. |
IKing |
getKingBlack()
|
IKing |
getKingWhite()
|
protected IKing |
locateKing(boolean isWhite)
Locate the King for the given paramter. |
boolean |
remove(Object object)
Remove the given object. |
protected void |
setKingBlack(IKing kingBlack)
|
protected void |
setKingWhite(IKing kingWhite)
|
Methods inherited from class org.vizzini.game.TokenArrayCollection |
---|
configure, contains, equals, findByName, get, get, getType, hashCode, isEmpty, iterator, iterator, move, move, size |
Methods inherited from class org.vizzini.util.AbstractCollection |
---|
addAll, containsAll, removeAll, retainAll, toArray, toArray, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.vizzini.util.ICollection |
---|
toString |
Methods inherited from interface java.util.Collection |
---|
addAll, containsAll, removeAll, retainAll, toArray, toArray |
Constructor Detail |
---|
public ChessTokenCollection()
Method Detail |
---|
public boolean add(Object object)
add
in interface Collection
add
in class TokenArrayCollection
public void clear()
clear
in interface Collection
clear
in class TokenArrayCollection
public Object clone()
clone
in interface ITokenCollection
clone
in class TokenArrayCollection
public IToken get(Class tokenType, IAgent agent0)
get
in interface ITokenCollection
get
in class TokenArrayCollection
public IKing getKing(boolean isWhite)
public IKing getKingBlack()
public IKing getKingWhite()
public boolean remove(Object object)
remove
in interface Collection
remove
in class TokenArrayCollection
protected IAgent getAgent(boolean isWhite)
isWhite
- Flag indicating if the white agent is wanted.protected IKing locateKing(boolean isWhite)
isWhite
- Flag indicating if the white King is wanted.protected void setKingBlack(IKing kingBlack)
kingBlack
- The kingBlack to set.protected void setKingWhite(IKing kingWhite)
kingWhite
- The kingWhite 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 |