T
- Data type of element in this value@FunctionalInterface public interface Value<T> extends Folds<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>
Fn0.FunctionalOperations<R>, Fn0.Instances, Fn0.SupplierKind<R>
Modifier and Type | Method and Description |
---|---|
default T |
apply()
Apply this function to the arguments.
|
default ReactiveSeq<T> |
generate() |
default ReactiveSeq<T> |
iterate(java.util.function.UnaryOperator<T> fn)
Use the value stored in this Value to seed a Stream generated from the provided function
|
default java.util.Iterator<T> |
iterator() |
default java.lang.String |
mkString()
Returns the class name and the name of the subclass, if there is any value, the value is showed between square brackets.
|
default ValueSubscriber<T> |
newSubscriber() |
static <T> Value<T> |
of(java.util.function.Supplier<T> supplier)
Construct a generic Value from the provided Supplier
|
default ReactiveSeq<T> |
stream() |
default void |
subscribe(org.reactivestreams.Subscriber<? super T> sub) |
default boolean |
test(T t) |
default Eval<T> |
toEvalAlways()
Return the value of this object, evaluated always.
|
default Eval<T> |
toEvalLater()
Return the value, evaluated later.
|
default Eval<T> |
toEvalNow()
Return the value, evaluated right now.
|
default Ior<?,T> |
toIor()
Return an Ior that can be this object or a Ior.primary or Ior.secondary
|
default Maybe<T> |
toMaybe()
Returns a function result or a supplier result.
|
default Try<T,java.lang.Throwable> |
toTry() |
default <X extends java.lang.Throwable> |
toTry(java.lang.Class<X>... classes)
Convert this Value to a Try that will catch the provided exception types on subsequent operations
|
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
|
endsWith, endsWithIterable, findAny, findFirst, firstValue, foldLeft, foldLeft, foldLeft, foldLeft, foldRight, foldRight, foldRight, foldRightMapToType, get, groupBy, join, join, join, mapReduce, mapReduce, print, print, printErr, printOut, reduce, reduce, reduce, reduce, reduce, reduce, reduce, schedule, scheduleFixedDelay, scheduleFixedRate, single, single, singleOptional, startsWith, startsWithIterable, toConcurrentLazyCollection, toConcurrentLazyStreamable, toLazyCollection, xMatch
futureStream, getStreamable, isEmpty, jdkStream, reactiveSeq, reveresedJDKStream, reveresedStream
collect, fromSupplier, get, isPresent, orElse, orElseGet, orElseThrow, toCompletableFuture, toCompletableFutureAsync, toCompletableFutureAsync, toFuture, toFutureWAsync, toFutureWAsync, toOptional, toStream, visit
default T apply()
org.jooq.lambda.function.Function0
apply
in interface org.jooq.lambda.function.Function0<T>
default java.util.Iterator<T> iterator()
iterator
in interface Convertable<T>
iterator
in interface java.lang.Iterable<T>
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)
supplier
- Value supplierdefault ReactiveSeq<T> stream()
default ReactiveSeq<T> iterate(java.util.function.UnaryOperator<T> fn)
fn
- Function to generate a Streamdefault ReactiveSeq<T> generate()
default <ST> Xor<ST,T> toXor(ST secondary)
secondary
- Value to use in case no primary value is presentdefault <X extends java.lang.Throwable> Try<T,X> toTry(X throwable)
throwable
- Exception to use if this Value is emptydefault Try<T,java.lang.Throwable> toTry()
default <X extends java.lang.Throwable> Try<T,X> toTry(java.lang.Class<X>... classes)
classes
- Exception classes to catch on subsequent operationsdefault Ior<?,T> toIor()
default Eval<T> toEvalNow()
default Eval<T> toEvalLater()
default Eval<T> toEvalAlways()
default Maybe<T> toMaybe()
default java.lang.String mkString()