-
-
Constructor Summary
Constructors Constructor Description Try.Failure(F exception)
-
Method Summary
Modifier and Type Method Description BooleanisSuccess()BooleanisFailure()final FgetException()SgetOrThrow()Returns the encapsulated value if this instance represents success or throws the encapsulated Throwable exception if it is failure. SgetOrNull()Returns the encapsulated value if this instance represents success or null if it is failure. FexceptionOrNull()Returns the encapsulated Throwable exception if this instance represents failure or null if it is success. -
-
Constructor Detail
-
Try.Failure
Try.Failure(F exception)
-
-
Method Detail
-
getException
final F getException()
-
getOrThrow
S getOrThrow()
Returns the encapsulated value if this instance represents success or throws the encapsulated Throwable exception if it is failure.
-
getOrNull
S getOrNull()
Returns the encapsulated value if this instance represents success or null if it is failure.
-
exceptionOrNull
F exceptionOrNull()
Returns the encapsulated Throwable exception if this instance represents failure or null if it is success.
-
-
-
-