public abstract class CompositeCondition extends Condition
Condition.Anchor
Constructor and Description |
---|
CompositeCondition() |
Modifier and Type | Method and Description |
---|---|
void |
addCondition(Condition condition) |
protected boolean |
allSubConditionsMatches(RuleEvaluation e)
Returns whether all the conditions of this matches the current evaluation state
|
Iterator<Condition> |
conditionIterator()
Returns an iterator of the immediate children of this condition
|
int |
conditionSize()
Returns the number of subconditions
|
protected String |
conditionsToString(String conditionSeparator) |
Condition |
getCondition(int i)
Returns the condition at the given index
|
protected boolean |
hasOpenChoicepoint(RuleEvaluation evaluation)
Returns whether there is an open choice in this or any of its subconditions.
|
void |
makeReferences(RuleBase rules)
Override if references needs to be set in this condition of its children
|
void |
postMatchHook(RuleEvaluation e)
Called just before match returns, on any return condition including exceptions.
|
void |
preMatchHook(RuleEvaluation e)
Called when match is called, before anything else.
|
Condition |
removeCondition(int i)
Returns the condition at the given index
|
void |
setCondition(int index,
Condition condition)
Sets the condition at the given index
|
protected String |
toInnerString(String conditionSeparator) |
protected boolean |
useParentheses()
Whether this should be output with parentheses, default is parent!=null
|
doesMatch, getAnchor, getContextName, getLabel, getLabelString, getMatchInfo, getMatchInfoString, getNameSpace, getParent, isDefaultContextName, isReferable, labelMatches, labelMatches, matches, matchesEndAnchor, matchesStartAnchor, setAnchor, setContextName, setLabel, setNameSpace, toInnerString, toString, traceResult
public void preMatchHook(RuleEvaluation e)
Condition
preMatchHook
in class Condition
public void postMatchHook(RuleEvaluation e)
Condition
postMatchHook
in class Condition
protected boolean hasOpenChoicepoint(RuleEvaluation evaluation)
Condition
hasOpenChoicepoint
in class Condition
public void addCondition(Condition condition)
public void setCondition(int index, Condition condition)
public int conditionSize()
public Condition getCondition(int i)
i
- the 0-base indexIndexOutOfBoundsException
- if there is no condition at this indexpublic Condition removeCondition(int i)
i
- the 0-base indexIndexOutOfBoundsException
- if there is no condition at this indexpublic Iterator<Condition> conditionIterator()
public void makeReferences(RuleBase rules)
Condition
makeReferences
in class Condition
protected boolean useParentheses()
protected final boolean allSubConditionsMatches(RuleEvaluation e)
Copyright © 2018. All rights reserved.