Represents a JSON Array
no subtypes hierarchy
Initializer |
Array({Value*} values = ...) Parameters:
|
Attributes | |
arrays | Source Codeshared {Array*} arrays Returns this array as a sequence of Throws
|
booleans | Source Codeshared {Boolean*} booleans Returns this array as a sequence of Throws
|
floats | Source Codeshared {Float*} floats Returns this array as a sequence of Throws
|
hash | Source Codeshared actual Integer hash The hash value of the value, which allows the value to be an element of a hash-based set or key of a hash-based map. Implementations must respect the constraint that:
Therefore, a class which refines In general, Note that when executing on a Java Virtual Machine, the
64-bit |
integers | Source Codeshared {Integer*} integers Returns this array as a sequence of Throws
|
lastIndex | Source Codeshared actual Integer? lastIndex The index of the last element of the list, or Refines List.lastIndex |
objects | Source Codeshared {Object*} objects Returns this array as a sequence of Throws
|
pretty | Source Codeshared String pretty Returns a pretty-printed serialised JSON representation |
rest | Source Codeshared actual Array rest A stream containing all but the first element of this
stream. For a stream with an unstable iteration order,
a different stream might be produced each time Therefore, if the stream |
reversed | Source Codeshared actual Array reversed A list containing the elements of this list in reverse
order to the order in which they occur in this list.
For every list.reversed[index]==list[size-1-index] This is a lazy operation returning a view of this list. Refines List.reversed |
size | Source Codeshared actual Integer size Returns the number of elements in this array |
string | Source Codeshared actual String string Returns a serialised JSON representation |
strings | Source Codeshared {String*} strings Returns this array as a sequence of Throws
|
Inherited Attributes |
Attributes inherited from: LangObject |
Attributes inherited from: Collection<Element> |
Attributes inherited from: Correspondence<Key,Item> |
Attributes inherited from: Iterable<Element,Absent> |
Attributes inherited from: List<Element> |
Methods | |
add | Source Codeshared actual void add(Value val) Adds a new value at the end of this array Refines ListMutator.add |
addAll | Source Codeshared actual void addAll({Value*} values) Refines ListMutator.addAll |
clear | Source Codeshared actual void clear() Remove every element from this list, leaving an empty list with no elements. Refines ListMutator.clear |
clone | Source Codeshared actual Array clone() A shallow copy of this collection, that is, a collection with identical elements which does not change if this collection changes. If this collection is immutable, it is acceptable to return a reference to this collection. If this collection is mutable, a newly instantiated collection must be returned. |
delete | Source Codeshared actual Value delete(Integer index) Remove the element at the specified |
deleteMeasure | Source Codeshared actual void deleteMeasure(Integer from, Integer length) Remove every element with an index in the measured
range Refines ListMutator.deleteMeasure |
deleteSpan | Source Codeshared actual void deleteSpan(Integer from, Integer to) Remove every element with an index in the spanned range
Refines ListMutator.deleteSpan |
equals | Source Codeshared actual Boolean equals(LangObject that) Determine if two values are equal. Implementations should respect the constraints that:
Furthermore it is recommended that implementations
ensure that if A class which explicitly refines Note that an implementation of |
getFromFirst | Source Codeshared actual Value getFromFirst(Integer index) The |
infill | Source Codeshared actual void infill(Value replacement) Replace all null values in this list with the given replacement value. Refines ListMutator.infill |
insert | Source Codeshared actual void insert(Integer index, Value val) Refines ListMutator.insert |
insertAll | Source Codeshared actual void insertAll(Integer index, {Value*} elements) Insert the given Refines ListMutator.insertAll |
iterator | Source Codeshared actual Iterator<Value> iterator() An iterator for the elements belonging to this stream. |
measure | Source Codeshared actual Array measure(Integer from, Integer length) Obtain a measure containing the mapped values starting
from the given starting index ( The measure should contain the given number ( When the given index does not belong to this ranged object, the behavior is implementation dependent. |
prune | Source Codeshared actual void prune() Remove all null elements from this list, leaving a list with no null elements. Refines ListMutator.prune |
remove | Source Codeshared actual Integer remove(ObjectValue val) Remove all occurrences of the given value from this list, returning the number of elements removed. To remove just one occurrence of the given value, use
Refines ListMutator.remove |
removeAll | Source Codeshared actual Integer removeAll({ObjectValue*} elements) Remove all occurrences of every one of the given values from this list, returning the number of elements removed. Refines ListMutator.removeAll |
removeFirst | Source Codeshared actual Boolean removeFirst(ObjectValue element) Remove the first occurrence of the given
value from this list, if any, returning
Refines ListMutator.removeFirst |
removeLast | Source Codeshared actual Boolean removeLast(ObjectValue element) Remove the last occurrence of the given
value from this list, if any, returning
Refines ListMutator.removeLast |
replace | Source Codeshared actual void replace(ObjectValue val, Value newVal) Replace all occurrences of the given value in this list with the given replacement value. To replace just one occurrence of the given value, use
Refines ListMutator.replace |
replaceFirst | Source Codeshared actual Boolean replaceFirst(ObjectValue element, Value replacement) Replace the first occurrence of the given
value in this list, if any, with the given
replacement value, returning Refines ListMutator.replaceFirst |
replaceLast | Source Codeshared actual Boolean replaceLast(ObjectValue element, Value replacement) Replace the last occurrence of the given
value in this list, if any, with the given
replacement value, returning Refines ListMutator.replaceLast |
set | Source Codeshared actual void set(Integer index, Value val) Refines ListMutator.set |
span | Source Codeshared actual Array span(Integer from, Integer to) Obtain a span containing the elements between the two given indices. The span should contain elements of this stream,
starting from the element at the given starting
index ( When one or both of the given indices does not belong to this ranged stream, the behavior is implementation dependent. |
spanFrom | Source Codeshared actual Array spanFrom(Integer from) Obtain a span containing the elements between the given
starting index ( The span should contain elements of this stream,
starting from the element at the given starting
index ( When the given index does not belong to this ranged stream, the behavior is implementation dependent. |
spanTo | Source Codeshared actual Array spanTo(Integer to) Obtain a span containing the elements between the first
index of this ranged stream and given end index ( The span should contain elements of this stream, up to
the element at the given ending index ( When the given index does not belong to this ranged stream, the behavior is implementation dependent. |
truncate | Source Codeshared actual void truncate(Integer size) Truncate this list to the given Refines ListMutator.truncate |