Package net.sf.saxon.pattern
Class NodePredicateLambda
java.lang.Object
net.sf.saxon.pattern.NodePredicateLambda
- All Implemented Interfaces:
NodePredicate
A
NodePredicate that wraps a general predicate applied to nodes.
This is needed for C#, where it is not possible for a method
to accept either a NodeTest object or a Predicate supplied as a lambda expression. To supply a predicate, it is
therefore necessary to wrap it in a NodePredicateLambda.
In SaxonJ the class is never instantiated, because the factory method of(Predicate)
returns a NodePredicate
-
Method Summary
-
Method Details
-
of
Create a NodeTest based on a supplied predicate. The NodeTest selects a node if the predicate returns true.- Parameters:
predicate- the supplied predicate (a boolean function of a node)- Returns:
- a NodeTest matching the selected nodes
-
test
- Specified by:
testin interfaceNodePredicate
-