Class BooleanSimplifier
- java.lang.Object
-
- com.yahoo.search.predicate.optimization.BooleanSimplifier
-
- All Implemented Interfaces:
PredicateProcessor
public class BooleanSimplifier extends Object implements PredicateProcessor
Simplifies a predicate by collapsing TRUE/FALSE-children into their parents. E.g. if an AND node has a FALSE child, the entire node is replaced by FALSE. Replaces single-child AND/OR-nodes with the child.- Author:
- Magnar Nedland, bjorncs
-
-
Constructor Summary
Constructors Constructor Description BooleanSimplifier()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Predicate
process(Predicate predicate, PredicateOptions options)
Processes a predicate.Predicate
simplifySubTree(Predicate predicate)
-
-
-
Method Detail
-
process
public Predicate process(Predicate predicate, PredicateOptions options)
Description copied from interface:PredicateProcessor
Processes a predicate.- Specified by:
process
in interfacePredicateProcessor
- Returns:
- the processed predicate.
-
-