public interface MonadicCollection<E>
extends java.util.Collection<E>
| Modifier and Type | Method and Description |
|---|---|
default boolean |
any(@NotNull Predicate<? super E> predicate) |
default @NotNull MonadicCollection<E> |
apply(@NotNull Consumer<MonadicCollection<E>> consumer) |
default <K,V> @NotNull java.util.Map<K,V> |
associate(@NotNull Function<? super E,Pair<K,V>> function) |
default <K> @NotNull java.util.Map<K,E> |
associateBy(@NotNull Function<? super E,K> function) |
default @NotNull MonadicCollection<E> |
filter(@NotNull Predicate<? super E> predicate) |
default @NotNull MonadicCollection<E> |
filterEquals(E element) |
default @NotNull MonadicCollection<E> |
filterIs(@NotNull java.lang.Class<? extends E> clazz) |
default @NotNull MonadicCollection<E> |
filterNonNull() |
default @NotNull MonadicCollection<E> |
filterNot(@NotNull Predicate<? super E> predicate) |
default @NotNull MonadicCollection<E> |
filterNotEquals(E element) |
default E |
find(@NotNull Predicate<? super E> predicate) |
E |
findLast(@NotNull Predicate<? super E> predicate) |
E |
first() |
<R> @NotNull MonadicCollection<R> |
flatMap(@NotNull Function<? super E,? extends MonadicCollection<R>> function) |
<R> @NotNull MonadicCollection<R> |
flatMapIndexed(@NotNull BiFunction<? super E,java.lang.Integer,? extends MonadicCollection<R>> function) |
default void |
forEachIndexed(@NotNull BiConsumer<? super E,java.lang.Integer> consumer) |
default boolean |
isNotEmpty() |
default @NotNull java.lang.String |
join() |
E |
last() |
<R> @NotNull MonadicCollection<R> |
map(@NotNull Function<? super E,? extends R> function) |
<R> @NotNull MonadicCollection<R> |
mapIndexed(@NotNull BiFunction<? super E,java.lang.Integer,? extends R> function) |
default boolean |
none(@NotNull Predicate<? super E> predicate) |
default @NotNull MonadicCollection<E> |
onEach(@NotNull Consumer<? super E> consumer) |
default @NotNull MonadicCollection<E> |
onEachIndexed(@NotNull BiConsumer<? super E,java.lang.Integer> consumer) |
default E |
random() |
E |
random(java.util.Random random) |
default void forEachIndexed(@NotNull
@NotNull BiConsumer<? super E,java.lang.Integer> consumer)
@NotNull default @NotNull MonadicCollection<E> onEach(@NotNull @NotNull Consumer<? super E> consumer)
@NotNull default @NotNull MonadicCollection<E> onEachIndexed(@NotNull @NotNull BiConsumer<? super E,java.lang.Integer> consumer)
@NotNull default @NotNull java.lang.String join()
@NotNull default @NotNull MonadicCollection<E> filter(@NotNull @NotNull Predicate<? super E> predicate)
@NotNull default @NotNull MonadicCollection<E> filterNot(@NotNull @NotNull Predicate<? super E> predicate)
@NotNull default @NotNull MonadicCollection<E> filterNonNull()
@NotNull default @NotNull MonadicCollection<E> filterIs(@NotNull @NotNull java.lang.Class<? extends E> clazz)
@NotNull default @NotNull MonadicCollection<E> filterEquals(@NotNull E element)
@NotNull default @NotNull MonadicCollection<E> filterNotEquals(@NotNull E element)
@NotNull
default <K,V> @NotNull java.util.Map<K,V> associate(@NotNull
@NotNull Function<? super E,Pair<K,V>> function)
@NotNull default <K> @NotNull java.util.Map<K,E> associateBy(@NotNull @NotNull Function<? super E,K> function)
@NotNull <R> @NotNull MonadicCollection<R> map(@NotNull @NotNull Function<? super E,? extends R> function)
@NotNull <R> @NotNull MonadicCollection<R> mapIndexed(@NotNull @NotNull BiFunction<? super E,java.lang.Integer,? extends R> function)
@NotNull <R> @NotNull MonadicCollection<R> flatMap(@NotNull @NotNull Function<? super E,? extends MonadicCollection<R>> function)
@NotNull <R> @NotNull MonadicCollection<R> flatMapIndexed(@NotNull @NotNull BiFunction<? super E,java.lang.Integer,? extends MonadicCollection<R>> function)
@NotNull default @NotNull MonadicCollection<E> apply(@NotNull @NotNull Consumer<MonadicCollection<E>> consumer)
E first()
E last()
E random(java.util.Random random)
default E random()
default boolean isNotEmpty()