Package com.yahoo.prelude.semantics.rule
Class AndCondition
- java.lang.Object
-
- com.yahoo.prelude.semantics.rule.Condition
-
- com.yahoo.prelude.semantics.rule.CompositeCondition
-
- com.yahoo.prelude.semantics.rule.AndCondition
-
public class AndCondition extends CompositeCondition
A condition which consists of a list of alternatives to match at any location- Author:
- bratseth
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.yahoo.prelude.semantics.rule.Condition
Condition.Anchor
-
-
Constructor Summary
Constructors Constructor Description AndCondition()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
doesMatch(RuleEvaluation e)
Returns whether this condition matches the given evaluation at the current location of the evaluation.protected java.lang.String
toInnerString()
All instances of this produces a parseable string outputprotected boolean
useParentheses()
Whether this should be output with parentheses, default is parent!=null-
Methods inherited from class com.yahoo.prelude.semantics.rule.CompositeCondition
addCondition, allSubConditionsMatches, conditionIterator, conditionSize, conditionsToString, getCondition, hasOpenChoicepoint, makeReferences, postMatchHook, preMatchHook, removeCondition, setCondition, toInnerString
-
Methods inherited from class com.yahoo.prelude.semantics.rule.Condition
getAnchor, getContextName, getLabel, getLabelString, getMatchInfo, getMatchInfoString, getNameSpace, getParent, isDefaultContextName, isReferable, labelMatches, labelMatches, matches, matchesEndAnchor, matchesStartAnchor, setAnchor, setContextName, setLabel, setNameSpace, toString, traceResult
-
-
-
-
Method Detail
-
doesMatch
public boolean doesMatch(RuleEvaluation e)
Description copied from class:Condition
Returns whether this condition matches the given evaluation at the current location of the evaluation. If there is a match, the evaluation must be advanced to the location beyond the matching item(s) before this method returns.
-
useParentheses
protected boolean useParentheses()
Description copied from class:CompositeCondition
Whether this should be output with parentheses, default is parent!=null- Overrides:
useParentheses
in classCompositeCondition
-
toInnerString
protected java.lang.String toInnerString()
Description copied from class:Condition
All instances of this produces a parseable string output- Specified by:
toInnerString
in classCondition
-
-