public abstract class AbstractArrayItem extends ArrayItem
| Constructor and Description |
|---|
AbstractArrayItem() |
| Modifier and Type | Method and Description |
|---|---|
AtomicSequence |
atomize()
Atomize the item.
|
GroundedValue |
call(XPathContext context,
Sequence[] args)
Invoke the array in its role as a function
|
boolean |
deepEquals(Function other,
XPathContext context,
AtomicComparer comparer,
int flags)
Test whether this array is deep-equal to another array,
under the rules of the deep-equal function
|
boolean |
effectiveBooleanValue()
Get the effective boolean value of this sequence
|
void |
export(ExpressionPresenter out)
Output information about this function item to the diagnostic explain() output
|
AnnotationList |
getAnnotations()
Get the function annotations (as defined in XQuery).
|
int |
getArity()
Get the arity of the function
|
java.lang.String |
getDescription()
Get a description of this function for use in error messages.
|
FunctionItemType |
getFunctionItemType()
Get the item type of the function item
|
StructuredQName |
getFunctionName()
Get the name of the function, or null if it is anonymous
|
SequenceType |
getMemberType(TypeHierarchy th)
Get the lowest common item type of the members of the array
|
OperandRole[] |
getOperandRoles()
Get the roles of the arguments, for the purposes of streaming
|
UnicodeString |
getUnicodeStringValue()
Get the value of the item as a string.
|
boolean |
isTrustedResultType()
Ask if the function can be trusted to return a result of the correct type
|
XPathContext |
makeNewContext(XPathContext callingContext,
ContextOriginator originator)
Prepare an XPathContext object for evaluating the function
|
java.lang.String |
toString()
Output a string representation of the array, suitable for diagnostics
|
arrayLength, concat, get, getGenre, insert, isArray, isEmpty, isMap, members, put, remove, removeSeveral, subArray, toShortStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisSequenceVariadicgetLength, getStringValue, head, isStreamed, itemAt, iterate, reduce, subsequenceasIterable, concatenate, containsNode, materializemakeRepeatablepublic OperandRole[] getOperandRoles()
public AtomicSequence atomize() throws XPathException
XPathException - if atomization is not allowed for this kind of itempublic AnnotationList getAnnotations()
public FunctionItemType getFunctionItemType()
public StructuredQName getFunctionName()
public java.lang.String getDescription()
public int getArity()
public XPathContext makeNewContext(XPathContext callingContext, ContextOriginator originator)
callingContext - the XPathContext of the function calling expressionoriginator - identifies the location of the caller for diagnosticspublic GroundedValue call(XPathContext context, Sequence[] args) throws XPathException
context - the XPath dynamic evaluation contextargs - the actual arguments to be supplied (a single integer)XPathException - if a dynamic error occurs within the functionpublic boolean deepEquals(Function other, XPathContext context, AtomicComparer comparer, int flags) throws XPathException
other - the other function itemcontext - the dynamic evaluation contextcomparer - the object to perform the comparisonflags - options for how the comparison is performedXPathException - if the comparison cannot be performedpublic boolean effectiveBooleanValue()
throws XPathException
XPathException - if the sequence has no effective boolean value (for example a sequence of two integers)public UnicodeString getUnicodeStringValue()
java.lang.UnsupportedOperationException - if the item is an array (an unchecked exception
is used here to avoid introducing exception handling to a large number of paths where it is not
needed)public void export(ExpressionPresenter out) throws XPathException
out - the destination for the informationXPathException - if things go wrongpublic boolean isTrustedResultType()
Functionpublic java.lang.String toString()
toString in class java.lang.Objectpublic SequenceType getMemberType(TypeHierarchy th)
getMemberType in class ArrayItemth - the type hierarchyCopyright (c) 2004-2022 Saxonica Limited. All rights reserved.