T
- Subscriber typepublic class ValueSubscriber<T> extends java.lang.Object implements org.reactivestreams.Subscriber<T>, Value<T>
ValueSubscriber<Integer> anInt = ValueSubscriber.reactiveSubscriber();
ReactiveSeq.of(1,2,3)
.publish(anInt);
Xor<Throwable,Integer> xor = anInt.toXor();
Try<Integer,Throwable> myTry = xor.toTry();
Maybe<Integer> maybe = myTry.toMaybe();
Optional<Integer> maybe = maybe.toOptional();
Value.ValueImpl<T>
Convertable.SupplierToConvertable<T>
Fn0.FunctionalOperations<R>, Fn0.Instances, Fn0.SupplierKind<R>
Modifier and Type | Method and Description |
---|---|
T |
get()
Apply this function to the arguments.
|
void |
onComplete() |
void |
onError(java.lang.Throwable t) |
void |
onNext(T t) |
void |
onSubscribe(org.reactivestreams.Subscription s) |
void |
requestOne() |
static <T> ValueSubscriber<T> |
subscriber() |
static <T> ValueSubscriber<T> |
subscriber(java.lang.Runnable onComplete) |
Ior<java.lang.Throwable,T> |
toIor()
Return an Ior that can be this object or a Ior.primary or Ior.secondary
|
<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
|
Xor<java.lang.Throwable,T> |
toXor() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
apply, generate, iterate, iterator, mkString, newSubscriber, of, stream, subscribe, test, toEvalAlways, toEvalLater, toEvalNow, toMaybe, toTry, toTry, toXor
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, isPresent, orElse, orElseGet, orElseThrow, toCompletableFuture, toCompletableFutureAsync, toCompletableFutureAsync, toFuture, toFutureWAsync, toFutureWAsync, toOptional, toStream, visit
public static <T> ValueSubscriber<T> subscriber(java.lang.Runnable onComplete)
public static <T> ValueSubscriber<T> subscriber()
public void onSubscribe(org.reactivestreams.Subscription s)
onSubscribe
in interface org.reactivestreams.Subscriber<T>
public void onError(java.lang.Throwable t)
onError
in interface org.reactivestreams.Subscriber<T>
public void onComplete()
onComplete
in interface org.reactivestreams.Subscriber<T>
public void requestOne()
public T get()
org.jooq.lambda.function.Function0
get
in interface Convertable<T>
get
in interface java.util.function.Supplier<T>
get
in interface org.jooq.lambda.function.Function0<T>
public <X extends java.lang.Throwable> Try<T,X> toTry(java.lang.Class<X>... classes)
Value