If in success state, applies the optional success value to the given
consumer, otherwise does nothing.
If in success state with a success value, applies the success value to
the given value consumer.
If in success state, applies the optional success value to the given
success consumer.
If in error state, applies the error value to the given consumer,
otherwise does nothing.
If in success state with a success value, applies the success value to
the given consumer, otherwise does nothing.
Returns an OptionalResult
in success state, which is empty with
no success value.
OptionalResult.error(E value)
Returns an OptionalResult
in error state containing the given
non-null
value as error value.
If in success state, applies the optional success value to the given
function.
If in success state, applies the success value to the given function.
If in success state, returns the OptionalResult
from applying
the given mapping function to the boolean success value, otherwise
returns a OptionalResult
containing the error value of this
BooleanResult
.
If in success state, returns the OptionalResult
from applying
the given mapping function to the optional success value, otherwise
returns the unaltered OptionalResult
in error state.
If in success state, returns the OptionalResult
from applying
the given mapping function to the success value, otherwise returns a
OptionalResult
containing the error value of this Result
.
If in success state with a success value, returns an
OptionalResult
from applying the given mapping function to the
success value, otherwise returns the unaltered OptionalResult
which may be empty or in error state.
If in success state with a success value, returns the
OptionalResult
from applying the given mapping function to the
success value, otherwise returns the unaltered OptionalResult
which may be empty or in error state.
If in success state with a success value, returns an
OptionalResult
from applying the given mapping function to the
success value, otherwise returns the unaltered OptionalResult
which may be empty or in error state.
If in error state, returns the OptionalResult
from applying the
given mapping function to the error value, otherwise returns the
unaltered OptionalResult
in success state.
If in empty success state, returns the OptionalResult
from
applying the given supplier, otherwise returns the unaltered
OptionalResult
in success state with value or error state.
If in success state, returns the OptionalResult
provided by the
given supplier, otherwise returns an OptionalResult
containing
the error value of this VoidResult
.
If in success state, runs the given supplier.
If in success state with a success value, runs the given supplier.
Handle the given Callable
.
Handle the given Callable
.
If in error state, returns a OptionalResult
containing the result
of applying the given mapping function to the error value, otherwise
returns the unaltered OptionalResult
in success state.
If in success state, returns a OptionalResult
containing the
result of applying the given mapping function to the boolean success
value, otherwise returns a OptionalResult
containing the error
value of this BooleanResult
.
If in success state, returns a OptionalResult
containing the
result of applying the given mapping function to the optional success
value, otherwise returns the unaltered OptionalResult
in error
state.
If in success state, returns a OptionalResult
containing the
result of applying the given mapping function to the success value,
otherwise returns a OptionalResult
containing the error value of
this Result
.
If in success state with a success value, returns an
OptionalResult
containing the result of applying the given
mapping function to the success value, otherwise returns the unaltered
OptionalResult
which may be empty or in error state.
If in success state with a success value, returns an
OptionalResult
containing the result of applying the given
mapping function to the success value, otherwise returns the unaltered
OptionalResult
which may be empty or in error state.
If in error state, returns a OptionalResult
with the success
value from applying the given mapping function to the error value,
otherwise returns the unaltered OptionalResult
in success state.
If in success state, returns a OptionalResult
containing the
optional value provided by given supplier, otherwise returns a
OptionalResult
containing the error value of this
VoidResult
.
Runs the given runnable, no matter the state.
If in success state, runs the given success runnable.
If in success state with a success value, runs the given value runnable.
If in empty success state with no success value, runs the given runnable,
otherwise does nothing.
If in error state, runs the given runnable, otherwise does nothing.
If in empty success state or error state, runs the given runnable,
otherwise does nothing.
If in success state, runs the given runnable, otherwise does nothing.
If in success state with a success value, runs the given runnable,
otherwise does nothing.
Returns an OptionalResult
in success state containing the given
non-null
value as success value.
Returns an OptionalResult
in success state containing the given
non-null
value as success value.
Returns an OptionalResult
in success state either containing the
given value as success value, or empty if the given value is null.
Transforms this BooleanResult
to an OptionalResult
.
Transforms this Result
to an OptionalResult
.
Transforms this VoidResult
to an OptionalResult
.
If in success state, verifies the success value of this
OptionalResult
by mapping it to a VoidResult
.
If in success state, verifies the optional success value of this
OptionalResult
by testing it with the given predicate.
If in non-empty success state, verifies the success value of this
OptionalResult
by mapping it to a VoidResult
.
If in success state with a success value, verifies the success value of
this OptionalResult
by testing it with the given predicate.
If in success state, returns the OptionalResult
from applying
the given mapping function to the boolean success value, otherwise
returns a OptionalResult
containing the error value of this
BooleanResult
.
If in success state, returns the OptionalResult
from applying
the given mapping function to the optional success value, otherwise
returns the unaltered OptionalResult
in error state.
If in success state, returns the OptionalResult
from applying
the given mapping function to the success value, otherwise returns a
OptionalResult
containing the error value of this Result
.
If in success state with a success value, returns the
OptionalResult
from applying the given mapping function to the
success value, otherwise returns the unaltered OptionalResult
which may be empty or in error state.
If in error state, returns the OptionalResult
from applying the
given mapping function to the error value, otherwise returns the
unaltered OptionalResult
in success state.
If in empty success state, returns the OptionalResult
from
applying the given supplier, otherwise returns the unaltered
OptionalResult
in success state with value or error state.
If in success state, returns the OptionalResult
provided by the
given supplier, otherwise returns an OptionalResult
containing
the error value of this VoidResult
.
runAlways(java.lang.Runnable)
instead for clarity