Package com.yahoo.prelude.semantics.rule
Class ComparisonCondition
- java.lang.Object
-
- com.yahoo.prelude.semantics.rule.Condition
-
- com.yahoo.prelude.semantics.rule.CompositeCondition
-
- com.yahoo.prelude.semantics.rule.ComparisonCondition
-
public class ComparisonCondition extends CompositeCondition
A condition which is true of the values of its two subconditions are true and both have the same value- Author:
- bratseth
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.yahoo.prelude.semantics.rule.Condition
Condition.Anchor
-
-
Constructor Summary
Constructors Constructor Description ComparisonCondition(Condition leftCondition, java.lang.String operatorString, Condition rightCondition)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
doesMatch(RuleEvaluation evaluation)
Returns whether this condition matches the given evaluation at the current location of the evaluation.Condition
getLeftCondition()
Condition
getRightCondition()
void
setLeftCondition(Condition leftCondition)
void
setRightCondition(Condition rightCondition)
protected java.lang.String
toInnerString()
All instances of this produces a parseable string outputprotected void
traceResult(boolean matches, RuleEvaluation e)
protected void
traceResult(boolean matches, RuleEvaluation e, java.lang.Object left, java.lang.Object right)
-
Methods inherited from class com.yahoo.prelude.semantics.rule.CompositeCondition
addCondition, allSubConditionsMatches, conditionIterator, conditionSize, conditionsToString, getCondition, hasOpenChoicepoint, makeReferences, postMatchHook, preMatchHook, removeCondition, setCondition, toInnerString, useParentheses
-
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
-
-
-
-
Method Detail
-
doesMatch
protected boolean doesMatch(RuleEvaluation evaluation)
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.
-
traceResult
protected void traceResult(boolean matches, RuleEvaluation e)
- Overrides:
traceResult
in classCondition
-
traceResult
protected void traceResult(boolean matches, RuleEvaluation e, java.lang.Object left, java.lang.Object right)
-
getLeftCondition
public Condition getLeftCondition()
-
setLeftCondition
public void setLeftCondition(Condition leftCondition)
-
getRightCondition
public Condition getRightCondition()
-
setRightCondition
public void setRightCondition(Condition rightCondition)
-
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
-
-