Package io.reacted.patterns
Class Try.Success<T>
java.lang.Object
io.reacted.patterns.Try<T>
io.reacted.patterns.Try.Success<T>
public static final class Try.Success<T> extends Try<T>
-
Nested Class Summary
Nested classes/interfaces inherited from class io.reacted.patterns.Try
Try.Failure<T>, Try.Success<T>, Try.TryConsumer<T>, Try.TryMapper<T,R>, Try.TryResourceSupplier<T>, Try.TryValueSupplier<T> -
Field Summary
-
Method Summary
Methods inherited from class io.reacted.patterns.Try
filter, filter, flatMap, identity, identity, ifError, ifSuccess, ifSuccessOrElse, isFailure, map, mapOrElse, noOp, of, ofCallable, ofFailure, ofRunnable, ofSuccess, orElse, orElse, orElseGet, orElseGet, orElseGet, orElseRecover, orElseSneakyThrow, orElseThrow, orElseTry, orElseTry, orElseTry, orElseTry, peek, peek, peekFailure, peekFailure, peekSuccess, recover, recover, recover, recover, stream, toOptional, withChainedResources, withResources, withResources
-
Method Details
-
valueOf
-
get
A successful Try holds a value that can be retrieved with this method. Please note that if the success value is NULL, you will get a Try.Success whose value returned by this get() is NULL If it's the case, please consider to use the toOptional() and stream() methods for safely process successful non-null result values -
isSuccess
public boolean isSuccess() -
getCause
public java.lang.Throwable getCause()A successful Try does not have any cause
-