If in success state, applies the boolean success value to the given
consumer, otherwise does nothing.
If in success state with a success value of true
, runs the given
true-runnable.
If in success state, applies the boolean success value to the given value
consumer.
If in error state, applies the error value to the given consumer,
otherwise does nothing.
BooleanResult.error(E value)
Returns a BooleanResult
in error state containing the given
non-null
value as error value.
If in success state, applies the boolean success value to the given
function.
If in success state, returns the BooleanResult
from applying the
given mapping function to the boolean success value, otherwise returns
the unaltered BooleanResult
in error state.
If in success state, returns the BooleanResult
from applying
the given mapping function to the optional success value, otherwise
returns a BooleanResult
containing the error value of this
OptionalResult
.
If in success state, returns the BooleanResult
from applying
the given mapping function to the success value, otherwise returns a
BooleanResult
containing the error value of this Result
.
If in error state, returns the BooleanResult
from applying the
given mapping function to the error value, otherwise returns the
unaltered BooleanResult
in success state.
If in success state, returns the BooleanResult
provided by the
given supplier, otherwise returns a BooleanResult
containing the
error value of this VoidResult
.
If in success state, runs the given supplier.
Handle the given Callable
.
Handle the given Callable
.
If in error state, returns a BooleanResult
containing the result
of applying the given mapping function to the error value, otherwise
returns the unaltered BooleanResult
in success state.
If in success state, returns a BooleanResult
containing the
result of applying the given mapping function to the success value,
otherwise returns the unaltered BooleanResult
in error state.
If in success state, returns a BooleanResult
containing the
result of applying the given mapping function to the optional success
value, otherwise returns a BooleanResult
containing the error
value of this OptionalResult
.
If in success state, returns a BooleanResult
containing the
result of applying the given mapping function to the success value,
otherwise returns a BooleanResult
containing the error value of
this Result
.
If in error state, returns a BooleanResult
with the success
value from applying the given mapping function to the error value,
otherwise returns the unaltered BooleanResult
in success state.
If in success state, returns a BooleanResult
containing the
boolean value provided by the given supplier, otherwise returns a
BooleanResult
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 of true
, runs the given
true-runnable.
If in error state, runs the given runnable, otherwise does nothing.
If in success state with a success value of false
, 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 of true
, runs the given
runnable, otherwise does nothing.
BooleanResult.success(boolean value)
Returns a BooleanResult
in success state containing the given
non-null
boolean value as success value.
Returns a BooleanResult
in success state containing false
as the boolean success value.
Returns a BooleanResult
in success state containing true
as the boolean success value.
If in success state, verifies the success value of this
BooleanResult
by mapping it to a VoidResult
.
If in success state, verifies the boolean success value of this
BooleanResult
by testing it with the given predicate.
If in success state, returns the BooleanResult
from applying the
given mapping function to the boolean success value, otherwise returns
the unaltered BooleanResult
in error state.
If in success state, returns the BooleanResult
from applying
the given mapping function to the optional success value, otherwise
returns a BooleanResult
containing the error value of this
OptionalResult
.
If in success state, returns the BooleanResult
from applying
the given mapping function to the success value, otherwise returns a
BooleanResult
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 error state, returns the BooleanResult
from applying the
given mapping function to the error value, otherwise returns the
unaltered BooleanResult
in success state.
If in success state, returns the BooleanResult
provided by the
given supplier, otherwise returns a BooleanResult
containing the
error value of this VoidResult
.
runAlways(java.lang.Runnable)
instead for clarity