Package com.yahoo.searchlib.treenet.rule
Class Condition
- java.lang.Object
-
- com.yahoo.searchlib.treenet.rule.TreeNode
-
- com.yahoo.searchlib.treenet.rule.Condition
-
- Direct Known Subclasses:
ComparisonCondition
,SetMembershipCondition
public abstract class Condition extends TreeNode
Represents a condition- Author:
- bratseth
-
-
Constructor Summary
Constructors Constructor Description Condition(java.lang.String leftValue, java.lang.String trueLabel, java.lang.String falseLabel)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract java.lang.String
conditionToRankingExpression()
Returns the ranking expression string for the condition part of this condition, i.e the ...java.lang.String
getFalseLabel()
Return the label to jump to if this condition is false.java.lang.String
getLeftValue()
Returns the name of the feature to compare to a constant.java.lang.String
getTrueLabel()
Return the label to jump to if this condition is true.java.lang.String
toRankingExpression()
Returns a ranking expression equivalent of this net.
-
-
-
Method Detail
-
getLeftValue
public java.lang.String getLeftValue()
Returns the name of the feature to compare to a constant.
-
getTrueLabel
public java.lang.String getTrueLabel()
Return the label to jump to if this condition is true.
-
getFalseLabel
public java.lang.String getFalseLabel()
Return the label to jump to if this condition is false.
-
toRankingExpression
public final java.lang.String toRankingExpression()
Description copied from class:TreeNode
Returns a ranking expression equivalent of this net.- Specified by:
toRankingExpression
in classTreeNode
-
conditionToRankingExpression
protected abstract java.lang.String conditionToRankingExpression()
Returns the ranking expression string for the condition part of this condition, i.e the ... part ofif(leftValue ..., trueExpression, falseExpression)
-
-