Package com.saxonica.ee.trans
Class IntEqualityPatternOptimizer
java.lang.Object
com.saxonica.ee.trans.PatternOptimizer
com.saxonica.ee.trans.IntEqualityPatternOptimizer
A PatternOptimizer is an agent responsible for optimizing a particular class
 of patterns. An 
IntEqualityPatternOptimizer is used for patterns of the
 form match="XXX[f(.) = 23]", that is, patterns containing a predicate
 that compares some value with an integer constant.- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionbooleanAsk whether this pattern optimizer is applicable to a particular patternstatic IntEqualityPatternOptimizervoidprocess(RuleEE rule, Pattern pattern, Map<Precondition, List<RuleEE>> preconditions, Map<Characteristic, Characteristic> characteristics) Process a particular pattern, potentially adding to the list of preconditions and characteristics maintained when processing a set of rulesMethods inherited from class com.saxonica.ee.trans.PatternOptimizer
addPrecondition, allocateCharacteristic 
- 
Constructor Details
- 
IntEqualityPatternOptimizer
public IntEqualityPatternOptimizer() 
 - 
 - 
Method Details
- 
getInstance
 - 
appliesTo
Description copied from class:PatternOptimizerAsk whether this pattern optimizer is applicable to a particular pattern- Specified by:
 appliesToin classPatternOptimizer- Parameters:
 pattern- the pattern in question- Returns:
 - true if this pattern optimizer is applicable to this pattern
 
 - 
process
public void process(RuleEE rule, Pattern pattern, Map<Precondition, List<RuleEE>> preconditions, Map<Characteristic, Characteristic> characteristics) Description copied from class:PatternOptimizerProcess a particular pattern, potentially adding to the list of preconditions and characteristics maintained when processing a set of rules- Specified by:
 processin classPatternOptimizer- Parameters:
 rule- the rule to be processedpattern- the pattern used by this rulepreconditions- a collection of preconditions maintained for a set of rulescharacteristics- a collection of characteristics maintained for a set of rules. This is maintained as a map from characteristics to characteristics in which the key and the value are always the same; the reason for this curious structure is that when an equivalent characteristic is already present in the map, we want to return the existing characteristic to replace the new one; a JavaSetdoes not have any (efficient) operation to "find the existing value in the set that is equal to X".
 
 -