org.newdawn.asd.data
Class ActorList

java.lang.Object
  extended byorg.newdawn.asd.data.ActorList

public class ActorList
extends java.lang.Object

A typed list of actors


Constructor Summary
ActorList()
          Create the actor list
 
Method Summary
 void addActor(Actor actor)
          Add an actor to the list
 boolean contains(Actor actor)
          Check if an specific actor is in the list
 Actor get(int i)
          Get the actor a specific index
 void removeActor(Actor actor)
          Remove an actor from the list
 int size()
          Get the number of actors in the list
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActorList

public ActorList()
Create the actor list

Method Detail

get

public Actor get(int i)
Get the actor a specific index

Parameters:
i - The index of the actor to retrieve
Returns:
The actor at the specified index

addActor

public void addActor(Actor actor)
Add an actor to the list

Parameters:
actor - The actor to add to the list

removeActor

public void removeActor(Actor actor)
Remove an actor from the list

Parameters:
actor - The actor to remove to the list

size

public int size()
Get the number of actors in the list

Returns:
The number of actors in the list

contains

public boolean contains(Actor actor)
Check if an specific actor is in the list

Parameters:
actor - The actor to check for
Returns:
True if the actor is in the list