ResourceTry<SuccessT> class

Inheritance

Constructors

ResourceTry.failure(ResourceException failure)
ResourceTry.success(SuccessT success)

Properties

failure ResourceException?
finalinherited
hashCode int
The hash code for this object.
no setterinherited
isFailure bool
no setterinherited
isSuccess bool
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
success → SuccessT?
finalinherited

Methods

exceptionOrNull() ResourceException?
Returns the encapsulated Throwable exception if this instance represents failure or null if it is success. */
inherited
flatMap<R>(Try<R, ResourceException> transform(SuccessT value)) → Try<R, ResourceException>
inherited
flatMapCatching<R>(ResourceTry<R> transform(SuccessT value)) ResourceTry<R>
flatMapResource<R>(ResourceTry<R> transform(SuccessT value)) ResourceTry<R>
flatMapWaitResource<R>(Future<ResourceTry<R>> transform(SuccessT value)) Future<ResourceTry<R>>
getOrElse(SuccessT onFailure(ResourceException)) → 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)) ResourceTry<R>
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.
override
mapCatching<R>(R transform(SuccessT value)) ResourceTry<R>
Maps the result with the given transform
mapWait<R>(Future<R> transform(SuccessT value)) Future<ResourceTry<R>>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onFailure(void action(ResourceException)) → Try<SuccessT, ResourceException>
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, ResourceException>
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

Operators

operator ==(Object other) bool
The equality operator.
inherited