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<?> |
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,
ContextOriginator originator)
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, wait
arrayLength, concat, get, getGenre, insert, isEmpty, members, put, remove, removeSeveral, subArray, toShortString
argumentArray
getLength, head, isStreamed, itemAt, iterate, iterator, reduce, subsequence, toGroundedValue
asIterable, materialize
makeRepeatable
public OperandRole[] getOperandRoles()
getOperandRoles
in interface Function
public boolean isArray()
public boolean isMap()
public AtomicSequence atomize() throws XPathException
atomize
in interface Item<Function>
XPathException
- if atomization is not allowed for this kind of itempublic AnnotationList getAnnotations()
getAnnotations
in interface Function
public FunctionItemType getFunctionItemType()
getFunctionItemType
in interface Function
public StructuredQName getFunctionName()
getFunctionName
in interface Function
public java.lang.String getDescription()
getDescription
in interface Function
public int getArity()
public XPathContext makeNewContext(XPathContext callingContext, ContextOriginator originator)
makeNewContext
in interface Function
callingContext
- the XPathContext of the function calling expressionoriginator
- public GroundedValue<?> call(XPathContext context, Sequence[] args) throws XPathException
call
in interface Callable
call
in interface Function
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
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<Function>
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<Function>
getStringValue
in interface Item<Function>
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<Function>
getStringValueCS
in interface Item<Function>
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
XPathException
public boolean isTrustedResultType()
Function
isTrustedResultType
in interface Function
public java.lang.String toString()
toString
in class java.lang.Object
public SequenceType getMemberType(TypeHierarchy th)
getMemberType
in interface ArrayItem
Copyright (c) 2004-2020 Saxonica Limited. All rights reserved.