Package com.github.tonivade.purefun.data
Interface ImmutableList<E>
- Type Parameters:
E- the type of elements in this list
- All Superinterfaces:
Bindable<Sequence<?>,,E> Iterable<E>,Kind<Sequence<?>,,E> Mappable<Sequence<?>,,E> Sequence<E>,SequenceOf<E>
- All Known Implementing Classes:
ImmutableList.PImmutableList,NonEmptyList
Similar to a LinkedList
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiondrop(int n) static <T> ImmutableList<T> empty()default ImmutableList<E> default <R> ImmutableList<R> static <T> ImmutableList<T> static <T> ImmutableList<T> head()default <R> ImmutableList<R> static <T> ImmutableList<T> of(T... elements) prependAll(Sequence<? extends E> other) reverse()sort(Comparator<? super E> comparator) default ImmutableList<E> tail()static <E> Collector<E, ?, ImmutableList<E>> toList()Methods inherited from interface java.lang.Iterable
forEach, iterator, spliteratorMethods inherited from interface com.github.tonivade.purefun.data.Sequence
asArray, asList, asSet, asTree, asTree, collect, contains, containsAll, findFirst, fold, foldLeft, foldRight, groupBy, isEmpty, join, join, join, reduce, size, stream, toArray, toCollection, toSequencedCollection, zipWithIndex
-
Method Details
-
toList
-
append
-
prepend
-
remove
-
appendAll
-
prependAll
-
removeAll
-
reverse
ImmutableList<E> reverse() -
sort
-
head
-
tail
-
drop
-
dropWhile
-
takeWhile
-
map
-
flatMap
default <R> ImmutableList<R> flatMap(Function1<? super E, ? extends Kind<Sequence<?>, ? extends R>> mapper) -
filter
-
filterNot
-
from
-
from
-
of
-
empty
-
toImmutableList
-