Package net.sf.saxon.om
Interface FunctionItem<T extends FunctionItem>
-
- All Superinterfaces:
Item<T>,PullEvent,ValueRepresentation<T>
public interface FunctionItem<T extends FunctionItem> extends Item<T>, ValueRepresentation<T>
XDM 3.0 introduces a third kind of item, beyond nodes and atomic values: the function item. Function items implement this marker interface. The actual implementation class is in Saxon-PE and Saxon-EE only.
-
-
Field Summary
-
Fields inherited from interface net.sf.saxon.om.ValueRepresentation
EMPTY_VALUE_ARRAY
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description FunctionItemcurry(ValueRepresentation<? extends Item>[] values)Curry a function by binding one or more (but not all) of its argumentsbooleandeepEquals(FunctionItem other, XPathContext context, GenericAtomicComparer comparer, int flags)Test whether this FunctionItem is deep-equal to another function item, under the rules of the deep-equal functionintgetArity()Get the arity of the functionFunctionItemTypegetFunctionItemType(TypeHierarchy th)Get the item type of the function itemStructuredQNamegetFunctionName()Get the name of the function, or null if it is anonymousSequenceIterator<? extends Item>invoke(SequenceIterator<? extends Item>[] args, XPathContext context)Invoke the function-
Methods inherited from interface net.sf.saxon.om.Item
getStringValue, getStringValueCS, getTypedValue
-
-
-
-
Method Detail
-
getFunctionItemType
FunctionItemType getFunctionItemType(TypeHierarchy th)
Get the item type of the function item- Parameters:
th- the type hierarchy cache- Returns:
- the function item's type
-
getFunctionName
StructuredQName getFunctionName()
Get the name of the function, or null if it is anonymous- Returns:
- the function name, or null for an anonymous inline function
-
getArity
int getArity()
Get the arity of the function- Returns:
- the number of arguments in the function signature
-
invoke
SequenceIterator<? extends Item> invoke(SequenceIterator<? extends Item>[] args, XPathContext context) throws XPathException
Invoke the function- Parameters:
args- the actual arguments to be suppliedcontext- the XPath dynamic evaluation context- Returns:
- the result of invoking the function
- Throws:
XPathException- if a dynamic error occurs within the function
-
curry
FunctionItem curry(ValueRepresentation<? extends Item>[] values) throws XPathException
Curry a function by binding one or more (but not all) of its arguments- Parameters:
values- the values to which the arguments are to be bound, representing an unbound argument (a placeholder) by null- Returns:
- a new function item in which the specified arguments of the original function are bound to a value
- Throws:
XPathException- if any dynamic error occurs
-
deepEquals
boolean deepEquals(FunctionItem other, XPathContext context, GenericAtomicComparer comparer, int flags) throws XPathException
Test whether this FunctionItem is deep-equal to another function item, under the rules of the deep-equal function- Parameters:
other- the other function itemcontext- the dynamic evaluation contextcomparer- the object to perform the comparisonflags- options for how the comparison is performed- Returns:
- true if the two function items are deep-equal
- Throws:
XPathException- if the comparison cannot be performed
-
-