public class PreconditionMatcher extends RuleSearchState
Constructor and Description |
---|
PreconditionMatcher(RuleChain chain,
XPathContext context)
Allocate a PreconditionMatcher for a given set of rules
|
Modifier and Type | Method and Description |
---|---|
java.lang.Boolean |
getPreconditionState(int slot)
Get the state of a given precondition.
|
<T> T |
obtainCharacteristic(Characteristic<T> chic)
Get the value of a particular characteristic of the item being matched, evaluating
it if it has not already been evaluated, and retaining its value for future use
|
void |
setPreconditionState(int slot,
boolean value)
Set the value of a given precondition.
|
public PreconditionMatcher(RuleChain chain, XPathContext context)
chain
- the set of rules being matchedcontext
- the XPath evaluation context; the context item is the item being matched against
the set of rulespublic java.lang.Boolean getPreconditionState(int slot)
slot
- the slot number allocated to the preconditionpublic void setPreconditionState(int slot, boolean value)
slot
- the slot number allocated to the preconditionvalue
- true if the precondition (for the item being matched) is known to be true,
false if it is known to be false.public <T> T obtainCharacteristic(Characteristic<T> chic) throws XPathException
T
- the type of value of this characteristicchic
- the characteristic to be evaluatedXPathException
- if evaluation of the characteristic failedCopyright (c) 2004-2020 Saxonica Limited. All rights reserved.