org.shapelogic.logic
Class AndTask

java.lang.Object
  extended by javax.swing.tree.DefaultMutableTreeNode
      extended by org.shapelogic.logic.BaseTask<java.lang.String>
          extended by org.shapelogic.logic.AndTask
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<com.google.inject.Module>, javax.swing.tree.MutableTreeNode, javax.swing.tree.TreeNode, org.apache.commons.jexl.JexlContext, Calc0<java.lang.String>, CalcInvoke<java.lang.String>, CalcValue<java.lang.String>, LazyCalc<java.lang.String>, Task<java.lang.String>
Direct Known Subclasses:
CalcAndSetTasks, ExistTasks

public class AndTask
extends BaseTask<java.lang.String>

In order for an AndTask to succeed all the child Tasks need to succeed.

So I should have a way to take one at a time and call calc on them.

Author:
Sami Badawi
See Also:
Serialized Form

Field Summary
protected  int _currentChildTaskNo
           
protected  int _failedChildTasks
           
static int NOT_STARTED
           
 
Fields inherited from class org.shapelogic.logic.BaseTask
_endTime, _failedSubTasksCount, _injector, _interest, _lastSubTaskState, _localContext, _localModule, _pathWork, _score, _selfWork, _selfWorkEstimate, _startTime, _state, _succededSubTasksCount, _value, CONTEXT_CALCULATION_MAP, DEFAULT_INTEREST, DEFAULT_SCORE, NAMED_TASKS, WORK_NOT_KNOWN
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
AndTask(BaseTask parent, boolean createLocalContext)
           
 
Method Summary
 java.lang.String mainCalc()
           
 
Methods inherited from class org.shapelogic.logic.BaseTask
calcNextSubTask, doPrintOnFail, errorOnFail, findEnumValue, findNamedValue, findNamedValueUsingSubTasks, getContext, getContextCalculation, getContextCalculationMap, getInjector, getInterest, getLastSubTaskState, getLocalContext, getLocalModule, getLowestContext, getName, getNamedTask, getNamedValue, getParentTask, getPathWork, getScore, getSelfTreeNode, getSelfWork, getSelfWorkEstimate, getState, getValue, getVars, invoke, isDirty, isPrintOnFail, iterator, match, postCalc, preCalc, setClassInContext, setClassInContext, setClassInContext, setContextCalculation, setInterest, setName, setNamedTask, setNamedValue, setPrintOnFail, setState, setup, setVars
 
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.swing.tree.TreeNode
children, getAllowsChildren, getChildAt, getChildCount, getIndex, getParent, isLeaf
 

Field Detail

NOT_STARTED

public static int NOT_STARTED

_currentChildTaskNo

protected int _currentChildTaskNo

_failedChildTasks

protected int _failedChildTasks
Constructor Detail

AndTask

public AndTask(BaseTask parent,
               boolean createLocalContext)
Method Detail

mainCalc

public java.lang.String mainCalc()
Specified by:
mainCalc in interface Task<java.lang.String>
Overrides:
mainCalc in class BaseTask<java.lang.String>


Copyright © 2009. All Rights Reserved.