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 Details

  • Method Details

    • getLeftValue

      public String getLeftValue()
      Returns the name of the feature to compare to a constant.
    • getTrueLabel

      public String getTrueLabel()
      Return the label to jump to if this condition is true.
    • getFalseLabel

      public String getFalseLabel()
      Return the label to jump to if this condition is false.
    • toRankingExpression

      public final String toRankingExpression()
      Description copied from class: TreeNode
      Returns a ranking expression equivalent of this net.
      Specified by:
      toRankingExpression in class TreeNode
    • conditionToRankingExpression

      protected abstract String conditionToRankingExpression()
      Returns the ranking expression string for the condition part of this condition, i.e the ... part of
           if(leftValue ..., trueExpression, falseExpression)