@FunctionalInterface public interface Value<T> extends java.util.function.Supplier<T>, Foldable<T>, Convertable<T>, org.reactivestreams.Publisher<T>, java.util.function.Predicate<T>
Modifier and Type | Interface and Description |
---|---|
static class |
Value.ValueImpl<T> |
Convertable.SupplierToConvertable<T>
Modifier and Type | Method and Description |
---|---|
default <R,A> R |
collect(java.util.stream.Collector<? super T,A,R> collector) |
default T |
fold(Monoid<T> monoid) |
default T |
fold(T identity,
java.util.function.BinaryOperator<T> accumulator) |
default ReactiveSeq<T> |
generate() |
default ReactiveSeq<T> |
iterate(java.util.function.UnaryOperator<T> fn) |
default <E> E |
mapReduce(Reducer<E> monoid)
Attempt to map this Sequence to the same type as the supplied Monoid
(Reducer) Then use Monoid to reduce values
|
default java.lang.String |
mkString() |
default ValueSubscriber<T> |
newSubscriber() |
static <T> Value<T> |
of(java.util.function.Supplier<T> supplier) |
default ReactiveSeq<T> |
stream() |
default void |
subscribe(org.reactivestreams.Subscriber<? super T> sub) |
default boolean |
test(T t) |
default DequeX<T> |
toDequeX() |
default Eval<T> |
toEvalAlways() |
default Eval<T> |
toEvalLater() |
default Eval<T> |
toEvalNow() |
default FeatureToggle<T> |
toFeatureToggle() |
default LazyFutureStream<T> |
toFutureStream() |
default LazyFutureStream<T> |
toFutureStream(LazyReact reactor) |
default Ior<?,T> |
toIor() |
default LazyImmutable<T> |
toLazyImmutable() |
default java.util.List<T> |
toList() |
default ListX<T> |
toListX() |
default Maybe<T> |
toMaybe() |
default Mutable<T> |
toMutable() |
default PBagX<T> |
toPBagX() |
default POrderedSetX<T> |
toPOrderedSetX() |
default PQueueX<T> |
toPQueueX() |
default PSetX<T> |
toPSetX() |
default PStackX<T> |
toPStackX() |
default PVectorX<T> |
toPVectorX() |
default QueueX<T> |
toQueueX() |
default SetX<T> |
toSetX() |
default SimpleReactStream<T> |
toSimpleReact() |
default SimpleReactStream<T> |
toSimpleReact(SimpleReact reactor) |
default SortedSetX<T> |
toSortedSetX() |
default Try<T,java.lang.Throwable> |
toTry() |
default <X extends java.lang.Throwable> |
toTry(java.lang.Class<X>... classes) |
default <X extends java.lang.Throwable> |
toTry(X throwable) |
default Xor<?,T> |
toXor() |
default <ST> Xor<ST,T> |
toXor(ST secondary)
Convert to an Xor where the secondary value will be used if no primary value is present
|
default ListX<?> |
unapply() |
endsWith, endsWithIterable, findAny, findFirst, firstValue, foldable, foldRight, foldRight, foldRight, foldRightMapToType, get, groupBy, join, join, join, mapReduce, print, print, printErr, printOut, reduce, reduce, reduce, reduce, reduce, reduce, reduce, schedule, scheduleFixedDelay, scheduleFixedRate, single, single, singleOptional, startsWith, startsWithIterable, toConcurrentLazyCollection, toConcurrentLazyStreamable, toLazyCollection, validate, xMatch
collect, fromSupplier, get, isPresent, iterator, orElse, orElseGet, orElseThrow, toAtomicReference, toCompletableFuture, toCompletableFutureAsync, toCompletableFutureAsync, toFutureW, toFutureWAsync, toFutureWAsync, toOptional, toOptionalAtomicReference, toStream, visit
default ValueSubscriber<T> newSubscriber()
default void subscribe(org.reactivestreams.Subscriber<? super T> sub)
subscribe
in interface org.reactivestreams.Publisher<T>
static <T> Value<T> of(java.util.function.Supplier<T> supplier)
default ReactiveSeq<T> stream()
default ListX<?> unapply()
default ReactiveSeq<T> iterate(java.util.function.UnaryOperator<T> fn)
default ReactiveSeq<T> generate()
default <E> E mapReduce(Reducer<E> monoid)
Foldable
ReactiveSeq.of("hello","2","world","4").mapReduce(Reducers.toCountInt());
//4
default LazyImmutable<T> toLazyImmutable()
default <ST> Xor<ST,T> toXor(ST secondary)
secondary
- Value to use in case no primary value is presentdefault FeatureToggle<T> toFeatureToggle()
default SortedSetX<T> toSortedSetX()
default POrderedSetX<T> toPOrderedSetX()
default java.lang.String mkString()
default LazyFutureStream<T> toFutureStream(LazyReact reactor)
default LazyFutureStream<T> toFutureStream()
default SimpleReactStream<T> toSimpleReact(SimpleReact reactor)
default SimpleReactStream<T> toSimpleReact()
default <R,A> R collect(java.util.stream.Collector<? super T,A,R> collector)
collect
in interface Convertable<T>
default java.util.List<T> toList()
toList
in interface Convertable<T>