Class BooleanExpressionEvaluator

java.lang.Object
com.google.common.css.compiler.passes.BooleanExpressionEvaluator

public class BooleanExpressionEvaluator extends 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.
  • Constructor Details

    • BooleanExpressionEvaluator

      public BooleanExpressionEvaluator(CssBooleanExpressionNode expression, Set<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, Set<String> trueConditions, Set<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 Details

    • evaluate

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