public class ImmutableArrayItem extends AbstractArrayItem
| Constructor and Description |
|---|
ImmutableArrayItem(SimpleArrayItem other) |
| Modifier and Type | Method and Description |
|---|---|
int |
arrayLength()
Get the number of members in the array
|
ArrayItem |
concat(ArrayItem other)
Concatenate this array with another
|
GroundedValue |
get(int index)
Get a member of the array
|
ArrayItem |
insert(int position,
GroundedValue member)
Insert a new member into an array
|
boolean |
isEmpty()
Ask whether the array is empty
|
java.lang.Iterable<GroundedValue> |
members()
Get the list of all members of the array
|
ArrayItem |
put(int index,
GroundedValue newValue)
Replace a member of the array
|
ArrayItem |
remove(int index)
Remove a member from the array
|
ArrayItem |
removeSeveral(IntSet positions)
Remove zero or more members from the array
|
ArrayItem |
subArray(int start,
int end)
Get a subarray given a start and end position
|
atomize, call, deepEquals, effectiveBooleanValue, export, getAnnotations, getArity, getDescription, getFunctionItemType, getFunctionName, getMemberType, getOperandRoles, getUnicodeStringValue, isTrustedResultType, makeNewContext, toStringgetGenre, isArray, isMap, toShortStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisSequenceVariadicgetLength, getStringValue, head, isStreamed, itemAt, iterate, reduce, subsequenceasIterable, concatenate, containsNode, materializemakeRepeatablepublic ImmutableArrayItem(SimpleArrayItem other)
public GroundedValue get(int index)
public ArrayItem put(int index, GroundedValue newValue)
public ArrayItem insert(int position, GroundedValue member)
public int arrayLength()
Note: the method always returns 1, because an array is an item
arrayLength in class ArrayItempublic boolean isEmpty()
public java.lang.Iterable<GroundedValue> members()
public ArrayItem subArray(int start, int end)
subArray in class ArrayItemstart - the start position (zero based)end - the end position (the position of the first item not to be returned)
(zero based)java.lang.IndexOutOfBoundsException - if start, or start+end, is out of rangepublic ArrayItem remove(int index)
public ArrayItem removeSeveral(IntSet positions)
removeSeveral in class ArrayItempositions - the positions of the members to be removed (zero-based).
A value that is out of range is ignored.Copyright (c) 2004-2022 Saxonica Limited. All rights reserved.