T
- Data type of the elements in the nested Monadpublic interface NestedCollectable<W extends WitnessType<W>,T>
Modifier and Type | Method and Description |
---|---|
default AnyM<W,java.lang.Boolean> |
allMatch(java.util.function.Predicate<? super T> c)
Each nested value will be true if predicate matches all elements when Monad converted to a Stream
Nested analog to
ReactiveSeq.allMatch(java.util.function.Predicate<? super T>) |
default AnyM<W,java.lang.Boolean> |
anyMatch(java.util.function.Predicate<? super T> c)
Each nested value will be True if a single element matches when Monad converted to a Stream
Nested analog to
ReactiveSeq.anyMatch(java.util.function.Predicate<? super T>) |
default <R,A> AnyM<W,R> |
collect(java.util.stream.Collector<? super T,A,R> collector) |
default <R,A,C extends java.util.Collection<R>> |
collect(java.util.function.Supplier<C> supplier,
java.util.stream.Collector<? super T,A,R> collector) |
default <R> FutureT<W,R> |
futureT(java.util.function.Function<? super java.lang.Iterable<T>,? extends R> fn,
java.util.concurrent.Executor exec) |
default ListT<W,T> |
listT(java.util.function.Function<? super java.lang.Iterable<T>,? extends FluentSequenceX<T>> toList) |
AnyM<W,? extends CyclopsCollectable<T>> |
nestedCollectables() |
default AnyM<W,java.lang.Boolean> |
noneMatch(java.util.function.Predicate<? super T> c)
Reduce each nested monad to a boolean value - true if the predicates match none of it's elements, otherwise false
|
default ListX<ListX<T>> |
toListOfLists() |
default AnyM<W,ListX<T>> |
toNestedListX() |
default AnyM<W,SetX<T>> |
toNestedSetX() |
default SetX<SetX<T>> |
toSetOfSets() |
AnyM<W,? extends CyclopsCollectable<T>> nestedCollectables()
default ListT<W,T> listT(java.util.function.Function<? super java.lang.Iterable<T>,? extends FluentSequenceX<T>> toList)
default <R> FutureT<W,R> futureT(java.util.function.Function<? super java.lang.Iterable<T>,? extends R> fn, java.util.concurrent.Executor exec)
default <R,A,C extends java.util.Collection<R>> C collect(java.util.function.Supplier<C> supplier, java.util.stream.Collector<? super T,A,R> collector)
default AnyM<W,java.lang.Boolean> allMatch(java.util.function.Predicate<? super T> c)
ReactiveSeq.allMatch(java.util.function.Predicate<? super T>)
assertThat(ReactiveSeq.of(1,2,3,4,5).allMatch(it-> it>0 && it <6),equalTo(true));
c
- Predicate to check if all matchdefault AnyM<W,java.lang.Boolean> anyMatch(java.util.function.Predicate<? super T> c)
ReactiveSeq.anyMatch(java.util.function.Predicate<? super T>)
assertThat(ReactiveSeq.of(1,2,3,4,5).anyMatch(it-> it.equals(3)),equalTo(true));
c
- Predicate to check if any matchdefault AnyM<W,java.lang.Boolean> noneMatch(java.util.function.Predicate<? super T> c)
c
- Predicate to check if no matchdefault ListX<ListX<T>> toListOfLists()
default SetX<SetX<T>> toSetOfSets()
default AnyM<W,ListX<T>> toNestedListX()