Class SwitchJob

All Implemented Interfaces:
Serializable, Runnable, ArooaContextAware, ArooaSessionAware, Forceable, PropertyChangeNotifier, Iconic, LogEnabled, Resettable, Stateful, Stoppable, Structural

public class SwitchJob extends StructuralJob<Object> implements Runnable, Stateful, Resettable, Structural, Stoppable
Author:
Rob Gordon
See Also:

Description

Switch Based on a predicate.
  • Constructor Details

    • SwitchJob

      public SwitchJob()
  • Method Details

    • setJobs

      public void setJobs(int index, Object job)
      Reference Property:
      jobs

      Description

      The child jobs.
      Required:
      At least one.
    • getInitialStateOp

      protected StateOperator getInitialStateOp()
      Description copied from class: StructuralJob
      Subclasses must provide the StateOperator that will decide how to evaluate the children's state.
      Specified by:
      getInitialStateOp in class StructuralJob<Object>
      Returns:
      A State Operator. Must not be null.
    • execute

      protected void execute()
      Description copied from class: StructuralJob
      Execute this job.
      Specified by:
      execute in class StructuralJob<Object>
    • getValue

      public Object getValue()
    • setValue

      public void setValue(Object value)
    • getPredicates

      public Predicate<Object>[] getPredicates()
    • setPredicates

      public void setPredicates(Predicate<Object>[] predicates)
    • getSwitches

      public ArooaValue[] getSwitches()
    • setSwitches

      public void setSwitches(ArooaValue[] switches)