Package com.saxonica.xsltextn.pedigree
Class DelegatingArrayItem
java.lang.Object
net.sf.saxon.ma.arrays.ArrayItem
net.sf.saxon.ma.arrays.AbstractArrayItem
com.saxonica.xsltextn.pedigree.DelegatingArrayItem
- All Implemented Interfaces:
Callable
,FunctionItem
,GroundedValue
,Item
,Sequence
- Direct Known Subclasses:
PedigreeArrayItem
A
DelegatingArrayItem
is an abstract class representing an array that
is implemented by delegating all array-related functionality to a base class.
Unless any methods are overridden, the functionality is identical to that
of the wrapped array item.
Note that methods such as put(int, net.sf.saxon.om.GroundedValue)
that create a new array will
(unless overridden) simply delegate to the base array, and the new array will
therefore not be a delegating array.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionappend
(GroundedValue newMember) Add a member to this arrayint
Get the number of members in the arrayConcatenate this array with anotherget
(int index) Get a member of the arrayinsert
(int position, GroundedValue member) Insert a new member into an arrayboolean
isEmpty()
Ask whether the array is emptymembers()
Get the list of all members of the arrayput
(int index, GroundedValue newValue) Replace a member of the arrayremove
(int index) Remove a member from the arrayremoveSeveral
(IntSet positions) Remove zero or more members from the arraysubArray
(int start, int end) Get a sub-array given a start and end positionMethods inherited from class net.sf.saxon.ma.arrays.AbstractArrayItem
atomize, call, deepEqual40, deepEquals, effectiveBooleanValue, export, getAnnotations, getArity, getDescription, getFunctionItemType, getFunctionName, getMemberType, getOperandRoles, getUnicodeStringValue, isTrustedResultType, makeNewContext, toString
Methods inherited from class net.sf.saxon.ma.arrays.ArrayItem
getGenre, isArray, isMap, parcels, toShortString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.sf.saxon.om.FunctionItem
isSequenceVariadic
Methods inherited from interface net.sf.saxon.om.GroundedValue
asIterable, concatenate, containsNode, materialize
Methods inherited from interface net.sf.saxon.om.Item
getLength, getStringValue, head, isStreamed, itemAt, iterate, reduce, subsequence
Methods inherited from interface net.sf.saxon.om.Sequence
makeRepeatable
-
Constructor Details
-
DelegatingArrayItem
-
-
Method Details
-
get
Description copied from class:ArrayItem
Get a member of the array -
put
Description copied from class:ArrayItem
Replace a member of the array -
arrayLength
public int arrayLength()Description copied from class:ArrayItem
Get the number of members in the arrayNote: the
method always returns 1, because an array is an item
- Specified by:
arrayLength
in classArrayItem
- Returns:
- the number of members in this array.
-
isEmpty
public boolean isEmpty()Description copied from class:ArrayItem
Ask whether the array is empty -
members
Description copied from class:ArrayItem
Get the list of all members of the array -
append
Description copied from class:ArrayItem
Add a member to this array -
concat
Description copied from class:ArrayItem
Concatenate this array with another -
remove
Description copied from class:ArrayItem
Remove a member from the array -
removeSeveral
Description copied from class:ArrayItem
Remove zero or more members from the array- Specified by:
removeSeveral
in classArrayItem
- Parameters:
positions
- the positions of the members to be removed (zero-based). A value that is out of range is ignored.- Returns:
- a new array in which the requested member has been removed
-
subArray
Description copied from class:ArrayItem
Get a sub-array given a start and end position -
insert
Description copied from class:ArrayItem
Insert a new member into an array -
getBaseItem
-