org.apache.commons.workflow.core
Class WhileAnyStep

java.lang.Object
  extended by org.apache.commons.workflow.base.BaseStep
      extended by org.apache.commons.workflow.base.DescriptorStep
          extended by org.apache.commons.workflow.base.BaseBlock
              extended by org.apache.commons.workflow.core.WhileStep
                  extended by org.apache.commons.workflow.core.WhileAnyStep
All Implemented Interfaces:
Block, Descriptors, Iterator, Owner, Step

public class WhileAnyStep
extends WhileStep

Repeatedly evaluate the properties specified by the associated Descriptors, and execute the nested Steps if and only if ANY of them evaluate to a positive result. To avoid non-deterministic evaluation stack behavior, all of the specified Descriptors are always evaluated exactly once.

Version:
$Revision: 155475 $ $Date: 2005-02-26 13:31:11 +0000 (Sat, 26 Feb 2005) $
Author:
Craig R. McClanahan

Field Summary
 
Fields inherited from class org.apache.commons.workflow.base.BaseBlock
firstStep, lastStep
 
Fields inherited from class org.apache.commons.workflow.base.DescriptorStep
descriptors
 
Fields inherited from class org.apache.commons.workflow.base.BaseStep
id, nextStep, owner, previousStep
 
Constructor Summary
WhileAnyStep()
          Construct a default instance of this Step.
WhileAnyStep(String id)
          Construct an instance of this Step with the specified identifier.
WhileAnyStep(String id, Descriptor descriptor)
          Construct a fully configured instance of this Step.
 
Method Summary
protected  boolean evaluate(Context context)
          Evaluate the condition specified by the Descriptors associated with this Block, and return the resulting boolean value.
 String toString()
          Render a string representation of this Step.
 
Methods inherited from class org.apache.commons.workflow.core.WhileStep
initial, subsequent
 
Methods inherited from class org.apache.commons.workflow.base.BaseBlock
addStep, clearSteps, execute, findStep, getFirstStep, getLastStep, getSteps, setSteps, state
 
Methods inherited from class org.apache.commons.workflow.base.DescriptorStep
addDescriptor, findDescriptors, removeDescriptor
 
Methods inherited from class org.apache.commons.workflow.base.BaseStep
getId, getNextStep, getOwner, getPreviousStep, setId, setNextStep, setOwner, setPreviousStep
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.commons.workflow.Owner
addStep, clearSteps, findStep, getFirstStep, getLastStep, getSteps, setSteps
 
Methods inherited from interface org.apache.commons.workflow.Step
execute, getId, getNextStep, getOwner, getPreviousStep, setId, setNextStep, setOwner, setPreviousStep
 

Constructor Detail

WhileAnyStep

public WhileAnyStep()
Construct a default instance of this Step.


WhileAnyStep

public WhileAnyStep(String id)
Construct an instance of this Step with the specified identifier.

Parameters:
id - Step identifier

WhileAnyStep

public WhileAnyStep(String id,
                    Descriptor descriptor)
Construct a fully configured instance of this Step.

Parameters:
id - Step identifier of this step
descriptor - Initial descriptor to be added
Method Detail

toString

public String toString()
Render a string representation of this Step.

Overrides:
toString in class WhileStep

evaluate

protected boolean evaluate(Context context)
Evaluate the condition specified by the Descriptors associated with this Block, and return the resulting boolean value.

Overrides:
evaluate in class WhileStep
Parameters:
context - Context within which to evaluate the descriptors


Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.