org.vizzini.game
Interface IAgentCollection

All Superinterfaces:
Cloneable, Collection, ICollection, Iterable, Serializable
All Known Implementing Classes:
AgentCollection

public interface IAgentCollection
extends ICollection, Cloneable

Defines methods required by collections that hold IAgent s.

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

Method Summary
 int count(Class type)
          Return the count of agents in this collection of the given type.
 IAgent findByName(String name)
          Return the agent with the given name.
 IAgent findByTeam(ITeam team)
          Return the first agent with the given team.
 IAgent firstOpponent(IAgent agent)
          Return the first found agent opponent to the given agent.
 Iterator opponentIterator(IAgent agent)
          Return an iterator over all the agents excepting the given agent.
 
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

count

int count(Class type)
Return the count of agents in this collection of the given type.

Parameters:
type - Agent class.
Since:
v0.2

findByName

IAgent findByName(String name)
Return the agent with the given name.

Since:
v0.1

findByTeam

IAgent findByTeam(ITeam team)
Return the first agent with the given team.

Since:
v0.3

firstOpponent

IAgent firstOpponent(IAgent agent)
Return the first found agent opponent to the given agent.

Parameters:
agent - Agent.
Since:
v0.3

opponentIterator

Iterator opponentIterator(IAgent agent)
Return an iterator over all the agents excepting the given agent.

Parameters:
agent - The agent to omit from the iterator.
Since:
v0.1


Copyright © 2007 Vizzini.org. All Rights Reserved. 2007.12.25.03.00.02