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
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 theCharacteristicwill always be anAncestorCharacteristic
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.saxonica.ee.trans.Precondition
Precondition.BooleanPrecondition, Precondition.NumericComparisonPrecondition, Precondition.StringHashPrecondition
-
-
Constructor Summary
Constructors Constructor Description BooleanPrecondition(Characteristic<java.lang.Boolean> characteristic)Create a precondition that maps directly to a boolean characteristic
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)inthashCode()booleantestPrecondition(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.StringtoString()-
Methods inherited from class com.saxonica.ee.trans.Precondition
isSatisfied, setSlotNumber
-
-
-
-
Constructor Detail
-
BooleanPrecondition
public BooleanPrecondition(Characteristic<java.lang.Boolean> characteristic)
Create a precondition that maps directly to a boolean characteristic- Parameters:
characteristic- the boolean characteristic
-
-
Method Detail
-
testPrecondition
public 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:
testPreconditionin 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:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-