Class BooleanExpressionEvaluator


  • public class BooleanExpressionEvaluator
    extends java.lang.Object
    An evaluator for boolean expressions. The evaluation returns a new boolean expression node corresponding to true, false, or to the condition if that was not recognized.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      CssBooleanExpressionNode evaluate()
      Evaluates the boolean expression associated with this evaluator.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BooleanExpressionEvaluator

        public BooleanExpressionEvaluator​(CssBooleanExpressionNode expression,
                                          java.util.Set<java.lang.String> trueConditions)
        Evaluates a boolean expression given a set of true conditions. Conditions that are not in the set are assumed to be false.
      • BooleanExpressionEvaluator

        public BooleanExpressionEvaluator​(CssBooleanExpressionNode expression,
                                          java.util.Set<java.lang.String> trueConditions,
                                          java.util.Set<java.lang.String> falseConditions)
        Evaluates a boolean expression given a set of true conditions and a set of false conditions. Conditions that are not in any of the sets are assumed to be unknown and are left in the resulting boolean expression.
    • Method Detail

      • evaluate

        public CssBooleanExpressionNode evaluate()
        Evaluates the boolean expression associated with this evaluator.