PublicationTry<SuccessT> class
- Inheritance
-
- Object
- Try<SuccessT, UserException>
- PublicationTry
Methods
-
exceptionOrNull()
→ UserException?
-
Returns the encapsulated
Throwable exception if this instance represents failure or null if it is success. */
inherited
-
flatMap<R>(Try<R, UserException> transform(SuccessT value))
→ Try<R, UserException>
-
inherited
-
getOrElse(SuccessT onFailure(UserException))
→ SuccessT
-
inherited
-
getOrNull()
→ SuccessT?
-
Returns the encapsulated value if this instance represents success or null if it is failure. */
inherited
-
getOrThrow()
→ SuccessT
-
Returns the encapsulated value if this instance represents success
or throws the encapsulated Throwable exception if it is failure.
inherited
-
map<R>(R transform(SuccessT value))
→ Try<R, UserException>
-
Returns the encapsulated result of the given transform function applied to the encapsulated value
if this instance represents success or the original encapsulated
Throwable exception if it is failure.
inherited
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
onFailure(void action(UserException))
→ Try<SuccessT, UserException>
-
Performs the given action on the encapsulated
Throwable exception if this instance represents failure.
Returns the original Try unchanged.
inherited
-
onSuccess(void action(SuccessT))
→ Try<SuccessT, UserException>
-
Performs the given action on the encapsulated value if this instance represents success.
Returns the original
Try unchanged.
inherited
-
toString()
→ String
-
A string representation of this object.
inherited