public interface Sequence<T>
extends java.util.List<T>
| Modifier and Type | Method and Description |
|---|---|
Sequence<T> |
append(T element)
Adds the given element, and returns a sequence, so this method call can be chained into
multiple ones.
|
Sequence<T> |
compact()
Returns a new sequence that contains only the non-null elements from this sequence, in the
same order as in this sequence.
|
T |
first()
Returns the first element in the sequence.
|
java.lang.String |
join(java.lang.String delimiter)
Returns the sequence as a String, joined by the delimiter.
|
T |
last()
Returns the last element in the sequence.
|
T |
takeFirst()
Removes and returns the first element in the sequence.
|
T |
takeLast()
Removes and returns the last element in the sequence.
|
Sequence<T> |
unique()
Returns a new sequence that contains unique elements from the sequence, in the same order as
in this one.
|
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArraySequence<T> append(T element)
T first()
T last()
T takeFirst()
T takeLast()
Sequence<T> unique()
Sequence<T> compact()
java.lang.String join(java.lang.String delimiter)