public class PedigreeArrayItem extends DelegatingArrayItem implements PedigreeValue
Pedigree
:
that is, retained information about how the array was selected with a JSON-like tree.SINGLE_ARRAY_TYPE
Constructor and Description |
---|
PedigreeArrayItem(ArrayItem base)
Create a PedigreeArrayItem with an empty pedigree
|
PedigreeArrayItem(ArrayItem base,
Pedigree pedigree)
Create a PedigreeArrayItem with a known pedigree
|
Modifier and Type | Method and Description |
---|---|
GroundedValue<?> |
get(int index)
Get the member of the array at a specified index, retaining information
about how that member was selected
|
Pedigree |
getPedigree()
Get the pedigree of this array item, providing information as to how it was selected.
|
java.lang.Iterable<GroundedValue<?>> |
members()
Return the members of the array as an iterable collection
|
ArrayItem |
remove(int index)
Get all members of the array except that at a specified position, retaining information
about how the remaining members were selected
|
ArrayItem |
subArray(int start,
int end)
Get a sub-array given a start and end position
|
arrayLength, concat, getBaseItem, insert, isEmpty, put, removeSeveral
atomize, call, deepEquals, effectiveBooleanValue, export, getAnnotations, getArity, getDescription, getFunctionItemType, getFunctionName, getMemberType, getOperandRoles, getStringValue, getStringValueCS, isArray, isMap, isTrustedResultType, makeNewContext, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getBaseItem, getOrigin
getGenre, toShortString
argumentArray
getLength, head, isStreamed, itemAt, iterate, iterator, reduce, subsequence, toGroundedValue
asIterable, materialize
makeRepeatable
public PedigreeArrayItem(ArrayItem base)
base
- the underlying array itempublic GroundedValue<?> get(int index) throws XPathException
get
in interface ArrayItem
get
in class DelegatingArrayItem
index
- the zero-based subscript of the selected member of the arrayXPathException
- if the index is out of boundspublic ArrayItem remove(int index)
remove
in interface ArrayItem
remove
in class DelegatingArrayItem
index
- the zero-based subscript of the member of the array that is to be removedjava.lang.IndexOutOfBoundsException
- if the index is out of boundspublic ArrayItem subArray(int start, int end)
ArrayItem
subArray
in interface ArrayItem
subArray
in class DelegatingArrayItem
start
- the start position (zero based)end
- the end position (the position of the first item not to be returned)
(zero based)public java.lang.Iterable<GroundedValue<?>> members()
members
in interface ArrayItem
members
in class DelegatingArrayItem
public Pedigree getPedigree()
getPedigree
in interface PedigreeValue
Copyright (c) 2004-2020 Saxonica Limited. All rights reserved.