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
public static class Precondition.BooleanPrecondition extends Precondition
ABooleanPrecondition
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 theCharacteristic
will always be anAncestorCharacteristic
-
-
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
Constructors Constructor Description BooleanPrecondition(Characteristic characteristic)
Create a precondition that maps directly to a boolean characteristic
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
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.java.lang.String
toString()
-
Methods inherited from class com.saxonica.ee.trans.Precondition
isSatisfied, setSlotNumber
-
-
-
-
Constructor Detail
-
BooleanPrecondition
public BooleanPrecondition(Characteristic characteristic)
Create a precondition that maps directly to a boolean characteristic- Parameters:
characteristic
- the boolean characteristic
-
-
Method Detail
-
testPrecondition
protected boolean testPrecondition(PreconditionMatcher matcher) throws XPathException
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()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-