Package net.sf.saxon.expr
Class ItemFilter
java.lang.Object
net.sf.saxon.expr.ItemFilter
- All Implemented Interfaces:
ItemMappingFunction
ItemMapper is an implementation of
ItemMappingFunction that wraps
a predicate function typically supplied as a lambda expression: unlike
a standard Predicate, however, the test is allowed to throw an XPathException.
NOTE: Java allows a lambda expression to be used wherever an ItemMappingFunction
is needed, but C# does not (it's not possible in C# to have a class implementing
a delegate). So if a lambda expression is wanted, use an ItemFilter
or ItemMapper as a wrapper.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionMap one item to another item.static ItemFilterof(ItemFilter.Lambda lambda)
-
Method Details
-
of
-
mapItem
Map one item to another item.- Specified by:
mapItemin interfaceItemMappingFunction- Parameters:
item- The input item to be mapped.- Returns:
- either the output item, or null.
- Throws:
XPathException- if a dynamic error occurs
-