A possibly-empty, immutable sequence of values. The type
Sequential<Element>
may be abbreviated [Element*]
or
Element[]
.
Sequential
has two enumerated subtypes:
Tuple
no type hierarchy
Attributes | |
keys | Source Codeshared actual default Integer[] keys A sequence containing all indexes of this sequence,
that is, every index in the range |
rest | Source Codeshared formal Element[] rest The rest of the sequence, without the first element. |
reversed | Source Codeshared formal Element[] reversed A sequence containing the elements of this sequence in reverse order to the order in which they occur in this sequence, or the empty sequence if this sequence is the empty sequence. Refines List.reversed |
size | Source Codeshared formal Integer size The strictly-positive length of this sequence, that is, the number of elements in this sequence. |
string | Source Codeshared actual default String string A string of form |
Inherited Attributes |
Attributes inherited from: Object |
Attributes inherited from: Collection<Element> |
Attributes inherited from: Correspondence<Key,Item> |
Attributes inherited from: Iterable<Element,Absent> |
Attributes inherited from: List<Element> |
Methods | |
append | Source Codeshared formal <Element|Other>[] append<Other>(Other[] elements) Return a sequence containing the elements of this
sequence, in the order in which they occur in this
sequence, followed by the given See also prepend() , withTrailing() , concatenate() , Iterable.chain() |
clone | Source Codeshared actual default Element[] clone() This sequence. |
initial | Source Codeshared actual default Element[] initial(Integer length) Select the first elements of this sequence, returning
a sequence no longer than the given length. If this
sequence is shorter than the given length, return this
sequence. Otherwise return a sequence of the given
length. If Refines List.initial |
prepend | Source Codeshared formal <Element|Other>[] prepend<Other>(Other[] elements) Return a sequence containing the given See also append() , withLeading() , concatenate() |
repeat | Source Codeshared formal Element[] repeat(Integer times) Produces a sequence formed by repeating the elements of
this sequence the given number of times, or
the empty sequence if |
sequence | Source Codeshared actual default Element[] sequence() This sequence. Refines Iterable.sequence |
slice | Source Codeshared actual default Element[][2] slice(Integer index) Return two sequences, the first containing the elements
that occur before the given Refines List.slice |
terminal | Source Codeshared actual default Element[] terminal(Integer length) Select the last elements of the sequence, returning a sequence no longer than the given length. If this sequence is shorter than the given length, return this sequence. Otherwise return a sequence of the given length. Refines List.terminal |
trim | Source Codeshared actual default Element[] trim(Boolean trimming(Element&Object element)) Trim the elements satisfying the given predicate function from the start and end of this sequence, returning a sequence no longer than this sequence. Parameters: Refines List.trim |
trimLeading | Source Codeshared actual default Element[] trimLeading(Boolean trimming(Element&Object element)) Trim the elements satisfying the given predicate function from the start of this sequence, returning a sequence no longer than this sequence. Parameters: Refines List.trimLeading |
trimTrailing | Source Codeshared actual default Element[] trimTrailing(Boolean trimming(Element&Object element)) Trim the elements satisfying the given predicate function from the end of this sequence, returning a sequence no longer than this sequence. Parameters: Refines List.trimTrailing |
withLeading | Source Codeshared formal [Other, Element*] withLeading<Other>(Other element) Returns a new sequence that starts with the specified
Parameters:
See also prepend() , withTrailing() , Iterable.follow() |
withTrailing | Source Codeshared formal [Element|Other+] withTrailing<Other>(Other element) Returns a new sequence that starts with the elements of
this sequence, in the order they occur in this sequence,
and ends with the specified Parameters:
See also append() , withLeading() |