jade.core.behaviours
Class ComplexBehaviour.BehaviourList

java.lang.Object
  |
  +--jade.core.behaviours.ComplexBehaviour.BehaviourList

protected class ComplexBehaviour.BehaviourList
extends java.lang.Object
implements java.io.Serializable

Inner class to implement a list of behaviours.

See Also:
Serialized Form

Constructor Summary
ComplexBehaviour.BehaviourList()
          Default constructor
 
Method Summary
 void addElement(Behaviour b)
          Add a new Behaviour to the end of the list.
 void begin()
          Moves the list cursor to the beginning.
 void end()
          Moves the list cursor to the end.
 Behaviour getCurrent()
          Reads the Behaviour pointed to by the list cursor.
 boolean isEmpty()
          Tells whether this list is empty.
 boolean next()
          Advances the list cursor by one.
 void popCurrent()
          Retrieves a previously saved list cursor.
 void pushCurrent()
          Save the list cursor on an internal stack.
 boolean removeElement(Behaviour b)
          Remove a Behaviour from the list.
 int size()
          Reads the current size of the list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComplexBehaviour.BehaviourList

public ComplexBehaviour.BehaviourList()
Default constructor
Method Detail

isEmpty

public boolean isEmpty()
Tells whether this list is empty.

addElement

public void addElement(Behaviour b)
Add a new Behaviour to the end of the list.

removeElement

public boolean removeElement(Behaviour b)
Remove a Behaviour from the list.
Returns:
true if the element was present in the list, false otherwise.

pushCurrent

public void pushCurrent()
Save the list cursor on an internal stack.

popCurrent

public void popCurrent()
Retrieves a previously saved list cursor.

getCurrent

public Behaviour getCurrent()
Reads the Behaviour pointed to by the list cursor.

begin

public void begin()
Moves the list cursor to the beginning.

end

public void end()
Moves the list cursor to the end.

next

public boolean next()
Advances the list cursor by one.
Returns:
true if the end of the list has been reached.

size

public int size()
Reads the current size of the list.