Package com.saxonica.ee.trans
Class Precondition.BooleanPrecondition
java.lang.Object
com.saxonica.ee.trans.Precondition
com.saxonica.ee.trans.Precondition.BooleanPrecondition
- Enclosing class:
Precondition
A
BooleanPrecondition
can in principle test any boolean characteristic
of a pattern. In practice it is used to test for the existence of a named ancestor/parent
element. That is, in current use the Characteristic
will always be an
AncestorCharacteristic
-
Nested Class Summary
Nested classes/interfaces inherited from class com.saxonica.ee.trans.Precondition
Precondition.BooleanPrecondition, Precondition.NumericComparisonPrecondition, Precondition.StringHashPrecondition
-
Field Summary
Fields inherited from class com.saxonica.ee.trans.Precondition
PRECONDITION_FALSE, PRECONDITION_TRUE, PRECONDITION_UNKNOWN
-
Constructor Summary
ConstructorsConstructorDescriptionBooleanPrecondition
(Characteristic characteristic) Create a precondition that maps directly to a boolean characteristic -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
hashCode()
protected boolean
testPrecondition
(PreconditionMatcher matcher) Evaluate the precondition, which will be true if and only if the value of the characteristic for the current item is the boolean value true.toString()
Methods inherited from class com.saxonica.ee.trans.Precondition
isSatisfied, setSlotNumber
-
Constructor Details
-
BooleanPrecondition
Create a precondition that maps directly to a boolean characteristic- Parameters:
characteristic
- the boolean characteristic
-
-
Method Details
-
testPrecondition
Evaluate the precondition, which will be true if and only if the value of the characteristic for the current item is the boolean value true.- Specified by:
testPrecondition
in classPrecondition
- Parameters:
matcher
- the PreconditionMatcher: holds the dynamic context for evaluation.- Returns:
- true if the precondition is satisfied
- Throws:
XPathException
- if evaluation of the precondition fails with a dynamic error
-
hashCode
public int hashCode() -
equals
-
toString
-