public abstract class AbstractArrayItem extends java.lang.Object implements ArrayItem
SINGLE_ARRAY_TYPE| Constructor and Description |
|---|
AbstractArrayItem() |
| Modifier and Type | Method and Description |
|---|---|
AtomicSequence |
atomize()
Atomize the item.
|
GroundedValue<? extends Item> |
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
|
java.lang.String |
getStringValue()
Get the value of the item as a string.
|
java.lang.CharSequence |
getStringValueCS()
Get the value of the item as a CharSequence.
|
boolean |
isArray()
Ask whether this function item is an array
|
boolean |
isMap()
Ask whether this function item is a map
|
boolean |
isTrustedResultType()
Check that result type is of the trusted system functions to return a result of the correct type
|
XPathContext |
makeNewContext(XPathContext callingContext)
Prepare an XPathContext object for evaluating the function
|
java.lang.String |
toString()
Output a string representation of the array, suitable for diagnostics
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitarrayLength, concat, get, getGenre, insert, isEmpty, members, put, remove, removeSeveral, subArray, toShortStringargumentArrayasArgumentArray, getLength, head, isStreamed, itemAt, iterate, iterator, reduce, subsequenceasIterable, materializemakeRepeatablepublic OperandRole[] getOperandRoles()
getOperandRoles in interface Function<ArrayItem>public boolean isArray()
public boolean isMap()
public AtomicSequence atomize() throws XPathException
atomize in interface Item<ArrayItem>XPathException - if atomization is not allowed for this kind of itempublic AnnotationList getAnnotations()
getAnnotations in interface Function<ArrayItem>public FunctionItemType getFunctionItemType()
getFunctionItemType in interface Function<ArrayItem>public StructuredQName getFunctionName()
getFunctionName in interface Function<ArrayItem>public java.lang.String getDescription()
getDescription in interface Function<ArrayItem>public int getArity()
public XPathContext makeNewContext(XPathContext callingContext)
makeNewContext in interface Function<ArrayItem>callingContext - the XPathContext of the function calling expressionpublic GroundedValue<? extends Item> call(XPathContext context, Sequence[] args) throws XPathException
call in interface Callablecall in interface Function<ArrayItem>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
deepEquals in interface Function<ArrayItem>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
effectiveBooleanValue in interface GroundedValue<ArrayItem>XPathException - if the sequence has no effective boolean value (for example a sequence of two integers)public java.lang.String getStringValue()
getStringValue in interface GroundedValue<ArrayItem>getStringValue in interface Item<ArrayItem>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)getStringValueCS()public java.lang.CharSequence getStringValueCS()
getStringValueCS in interface GroundedValue<ArrayItem>getStringValueCS in interface Item<ArrayItem>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)getStringValueCS()public void export(ExpressionPresenter out) throws XPathException
export in interface Function<ArrayItem>XPathExceptionpublic boolean isTrustedResultType()
FunctionisTrustedResultType in interface Function<ArrayItem>public java.lang.String toString()
toString in class java.lang.Objectpublic SequenceType getMemberType(TypeHierarchy th)
getMemberType in interface ArrayItemCopyright (c) 2004-2018 Saxonica Limited. All rights reserved.