net.nexttext.behaviour.control
Class Multiplexer

java.lang.Object
  extended by net.nexttext.behaviour.AbstractAction
      extended by net.nexttext.behaviour.control.Multiplexer
All Implemented Interfaces:
Action

public class Multiplexer
extends AbstractAction

The Multiplexer applies a series of Actions in parallel.


Nested Class Summary
 
Nested classes/interfaces inherited from interface net.nexttext.behaviour.Action
Action.ActionResult
 
Constructor Summary
Multiplexer()
          Create a new Multiplexer with no actions.
Multiplexer(java.util.List<Action> actions)
           
 
Method Summary
 void add(Action action)
          Add an action to the Multiplexer.
 Action.ActionResult behave(TextObject to)
          Apply all the actions to the TextObject.
 void complete(TextObject to)
          End the multiplexer for this object.
 java.util.Map<java.lang.String,Property> getRequiredProperties()
          The required properties are the union of all properties in the action chain.
 void reset(TextObject to)
          Reset the multiplexer.
 
Methods inherited from class net.nexttext.behaviour.AbstractAction
behave, behave, getDisplayName, makeBehaviour, properties, setDisplayName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Multiplexer

public Multiplexer(java.util.List<Action> actions)
Parameters:
actions - a List containing Action objects.

Multiplexer

public Multiplexer()
Create a new Multiplexer with no actions.

Method Detail

add

public void add(Action action)
Add an action to the Multiplexer.


behave

public Action.ActionResult behave(TextObject to)
Apply all the actions to the TextObject.

The results of the called actions are combined using the method described in ActionResult.

Specified by:
behave in interface Action
Overrides:
behave in class AbstractAction

reset

public void reset(TextObject to)
Reset the multiplexer.


complete

public void complete(TextObject to)
End the multiplexer for this object.

Specified by:
complete in interface Action
Overrides:
complete in class AbstractAction

getRequiredProperties

public java.util.Map<java.lang.String,Property> getRequiredProperties()
The required properties are the union of all properties in the action chain.

Specified by:
getRequiredProperties in interface Action
Overrides:
getRequiredProperties in class AbstractAction