org.vizzini.game
Interface ITokenCollection

All Superinterfaces:
Cloneable, Collection, ICollection, Iterable, Serializable
All Known Subinterfaces:
ICardCollection
All Known Implementing Classes:
CardCollection, ChessTokenCollection, PokerDeck, TokenArrayCollection, TokenCollection, TokenPositionCollection

public interface ITokenCollection
extends ICollection, Cloneable

Defines methods required by collections that hold IToken s.

Since:
v0.1
Version:
v0.3
Author:
Jeffrey M. Thompson

Method Summary
 Object clone()
          Return a deep clone of this instance.
 void configure(Properties properties)
          Configure this collection.
 IToken findByName(String name)
          Return the team with the given name.
 IToken get(Class tokenType, IAgent agent)
          Return the first token found of the given type belonging to the given agent.
 IToken get(IPosition position)
          Return the token at the given position.
 Iterator iterator(Class aClass)
          Return an iterator over the collection of tokens of the given class.
 
Methods inherited from interface org.vizzini.util.ICollection
toString
 
Methods inherited from interface java.util.Collection
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 

Method Detail

clone

Object clone()
Return a deep clone of this instance.

Since:
v0.1

configure

void configure(Properties properties)
               throws InstantiationException,
                      IllegalAccessException
Configure this collection.

Parameters:
properties - Source of configuration information. This is typically the game.properties.
Throws:
InstantiationException
IllegalAccessException
Since:
v0.2

findByName

IToken findByName(String name)
Return the team with the given name.

Since:
v0.1

get

IToken get(IPosition position)
Return the token at the given position.

Since:
v0.1

get

IToken get(Class tokenType,
           IAgent agent)
Return the first token found of the given type belonging to the given agent.

Since:
v0.1

iterator

Iterator iterator(Class aClass)
Return an iterator over the collection of tokens of the given class.

Since:
v0.2


Copyright 2007 Vizzini.org. All Rights Reserved. 2007.12.25.03.00.02