Trull

edu.luc.cs.trull
Class BranchValuator

java.lang.Object
  extended by edu.luc.cs.trull.BranchValuator
All Implemented Interfaces:
EventValuator

public class BranchValuator
extends java.lang.Object
implements EventValuator

An EventValuator suitable for branching on the label of an incoming event. This valuator returns the index of the label of the incoming event in the specified array of event labels, or -1 if not in the array.


Field Summary
protected  java.util.Map eventMap
           
 
Constructor Summary
BranchValuator(java.lang.String[] labels)
          Constructs a BranchValuator that returns the index of the label of the incoming event in the specified array
 
Method Summary
 int apply(java.beans.PropertyChangeEvent incoming)
          Computes an int from the given event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

eventMap

protected java.util.Map eventMap
Constructor Detail

BranchValuator

public BranchValuator(java.lang.String[] labels)
Constructs a BranchValuator that returns the index of the label of the incoming event in the specified array

Parameters:
labels - the array of event labels to be considered.
Method Detail

apply

public int apply(java.beans.PropertyChangeEvent incoming)
Description copied from interface: EventValuator
Computes an int from the given event.

Specified by:
apply in interface EventValuator
Parameters:
incoming - the event.
Returns:
the computed int.

Trull

http://www.cs.luc.edu/trull/