Class Try.Success<S0,E0 extends Exception>
java.lang.Object
org.ehrbase.openehr.sdk.util.functional.Either<S,E>
org.ehrbase.openehr.sdk.util.functional.Try<S0,E0>
org.ehrbase.openehr.sdk.util.functional.Try.Success<S0,E0>
-
Nested Class Summary
Nested classes/interfaces inherited from class org.ehrbase.openehr.sdk.util.functional.Try
Try.Failure<S0,E0 extends Exception>, Try.Success<S0, E0 extends Exception> Nested classes/interfaces inherited from class org.ehrbase.openehr.sdk.util.functional.Either
Either.Left<L,R>, Either.Right<L, R> -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoidconsume(BiConsumer<S0, E0> con) Convenience method to consume the internal stateget()booleanboolean<T> Tmap(BiFunction<S0, E0, T> map) Convenience method to transform the internal state
-
Method Details
-
isSuccess
public boolean isSuccess() -
isFailure
public boolean isFailure() -
get
-
getOrThrow
-
getAsSuccess
- Specified by:
getAsSuccessin classTry<S0,E0 extends Exception>
-
getAsFailure
- Specified by:
getAsFailurein classTry<S0,E0 extends Exception>
-
map
Description copied from class:TryConvenience method to transform the internal state -
consume
Description copied from class:TryConvenience method to consume the internal state -
getAsLeft
-
getAsRight
- Specified by:
getAsRightin classEither<S0,E0 extends Exception>
-