net.nexttext.behaviour.control
Class Tracker

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

public class Tracker
extends AbstractAction

Tracks the TextObjects processed by an action.

Tracker can be used to determine how many and which TextObjects are currently being processed. It is constructed with an action to track, and is used in place of the action being tracked.


Nested Class Summary
 
Nested classes/interfaces inherited from interface net.nexttext.behaviour.Action
Action.ActionResult
 
Constructor Summary
Tracker(Action action)
          Construct a Tracker for the given Action.
 
Method Summary
 Action.ActionResult behave(TextObject to)
          Pass the TextObject on to the contained Action, tracking the object.
 int getCount()
          Get the count of objects currently being processed by the action.
 boolean isProcessing(TextObject to)
          Determine if a specific object is being processed by the action.
 
Methods inherited from class net.nexttext.behaviour.AbstractAction
behave, behave, complete, getDisplayName, getRequiredProperties, makeBehaviour, properties, setDisplayName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Tracker

public Tracker(Action action)
Construct a Tracker for the given Action.

Method Detail

behave

public Action.ActionResult behave(TextObject to)
Pass the TextObject on to the contained Action, tracking the object.

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

getCount

public int getCount()
Get the count of objects currently being processed by the action.


isProcessing

public boolean isProcessing(TextObject to)
Determine if a specific object is being processed by the action.