Package com.github.tonivade.purefun.data
Class NonEmptyList<E>
java.lang.Object
com.github.tonivade.purefun.data.NonEmptyList<E>
- All Implemented Interfaces:
Bindable<Sequence<?>,,E> Mappable<Sequence<?>,,E> ImmutableList<E>,Sequence<E>,SequenceOf<E>,Kind<Sequence<?>,,E> Serializable,Iterable<E>
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.github.tonivade.purefun.data.ImmutableList
ImmutableList.PImmutableList<E> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Equal<NonEmptyList<?>> private static final longprivate final ImmutableList<E> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleandrop(int n) boolean<R> NonEmptyList<R> inthashCode()head()booleanisEmpty()iterator()<R> NonEmptyList<R> static <E> NonEmptyList<E> of(ImmutableList<E> value) static <E> NonEmptyList<E> of(E value, E... values) prependAll(Sequence<? extends E> other) reverse()intsize()sort(Comparator<? super E> comparator) toList()toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.github.tonivade.purefun.data.ImmutableList
tailMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
EQUAL
-
value
-
-
Constructor Details
-
NonEmptyList
-
-
Method Details
-
map
-
flatMap
public <R> NonEmptyList<R> flatMap(Function1<? super E, ? extends Kind<Sequence<?>, ? extends R>> mapper) -
filter
-
filterNot
-
toList
- Specified by:
toListin interfaceImmutableList<E>
-
size
public int size() -
isEmpty
public boolean isEmpty() -
contains
-
append
-
prepend
- Specified by:
prependin interfaceImmutableList<E>
-
remove
-
appendAll
-
prependAll
- Specified by:
prependAllin interfaceImmutableList<E>
-
removeAll
-
reverse
-
sort
- Specified by:
sortin interfaceImmutableList<E>
-
iterator
-
head
- Specified by:
headin interfaceImmutableList<E>
-
drop
- Specified by:
dropin interfaceImmutableList<E>
-
dropWhile
- Specified by:
dropWhilein interfaceImmutableList<E>
-
takeWhile
- Specified by:
takeWhilein interfaceImmutableList<E>
-
hashCode
public int hashCode() -
equals
-
toString
-
of
-
of
-