|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.tree.DefaultMutableTreeNode org.shapelogic.logic.BaseTask org.shapelogic.logic.SimpleTask org.shapelogic.logic.ParametricRuleTask
public class ParametricRuleTask
More general task that can create all the other tasks, by taking 2 parameters.
1: A variable that the expression should work on
2: An expression that can contain the #, which will be replaced with the variable
The constructor takes a BinaryPredicate
as an argument.
Field Summary | |
---|---|
protected BinaryPredicate |
_binaryPredicate
|
Fields inherited from class org.shapelogic.logic.SimpleTask |
---|
_expected, _expression |
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 | |
---|---|
ParametricRuleTask(BaseTask parent,
boolean createLocalContext,
java.lang.String variable,
java.lang.String expression,
java.lang.Object expectedValue,
java.lang.String binaryPredicateName)
|
Method Summary | |
---|---|
boolean |
match()
Can be overridden |
static java.lang.String |
transformExpression(java.lang.String variable,
java.lang.String expression)
Transform an expression and a variable to an expression where the variable has been substituted for #. |
Methods inherited from class org.shapelogic.logic.SimpleTask |
---|
getExpression, setup |
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 |
---|
protected BinaryPredicate _binaryPredicate
Constructor Detail |
---|
public ParametricRuleTask(BaseTask parent, boolean createLocalContext, java.lang.String variable, java.lang.String expression, java.lang.Object expectedValue, java.lang.String binaryPredicateName)
Method Detail |
---|
public boolean match()
SimpleTask
match
in interface Task
match
in class SimpleTask
public static java.lang.String transformExpression(java.lang.String variable, java.lang.String expression)
variable
- in a JEXL contextexpression
- where # is a place holder for the variable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |