PaP
Class ActorManager

java.lang.Object
  |
  +--PaP.ActorManager
All Implemented Interfaces:
java.io.Serializable

public class ActorManager
extends java.lang.Object
implements java.io.Serializable

Manages active Actors within a PaP domain controlled by one Director. Director has one instance of it.

See Also:
Serialized Form

Field Summary
private  java.util.Hashtable htActorInstances
          Active actors this object manages
 
Constructor Summary
ActorManager()
          Initializes data fields.
 
Method Summary
 Actor actorGet(GAI keyGAI)
          Get actors from this manager.
 int actorPut(Actor actor)
          Saves actors in this manager.
 Actor actorRemove(java.lang.String key)
          Removes actors from this manager.
 boolean empty()
          Simple utility to determine if there are active actors.
 Item listActors()
          Lists all actors this manager holds for debug purposes.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

htActorInstances

private java.util.Hashtable htActorInstances
Active actors this object manages
Constructor Detail

ActorManager

public ActorManager()
Initializes data fields.
Parameters:
pBF - BaseFrame for this manager
Method Detail

empty

public boolean empty()
Simple utility to determine if there are active actors.
Returns:
true if there are no more active actors in this manager.

actorPut

public int actorPut(Actor actor)
Saves actors in this manager.
Parameters:
actor - The actor to be saved.
Returns:
1 if actor is already saved, 2 if NullPointerException, 0 if actor saved OK.

actorRemove

public Actor actorRemove(java.lang.String key)
Removes actors from this manager.
Parameters:
key - GAI string of the actor to be removed.
Returns:
The removed actor.

actorGet

public Actor actorGet(GAI keyGAI)
Get actors from this manager.
Parameters:
keyGAI - GAI value of the actor to be found.
Returns:
The actor.

listActors

public Item listActors()
Lists all actors this manager holds for debug purposes.
Returns:
Actors listed in a String array.