Index
All Classes and Interfaces|All Packages
B
- BooleanResult<E> - Class in no.gorandalum.fluentresult
-
A result object which either is in success state containing a non-
null
boolean value, or in error state containing a non-null
error value.
C
- CheckedRunnable - Interface in no.gorandalum.fluentresult
- consume(Consumer<? super T>) - Method in class no.gorandalum.fluentresult.Result
-
If in success state, applies the success value to the given consumer, otherwise does nothing.
- consume(Consumer<Boolean>) - Method in class no.gorandalum.fluentresult.BooleanResult
-
If in success state, applies the boolean success value to the given consumer, otherwise does nothing.
- consume(Consumer<Optional<T>>) - Method in class no.gorandalum.fluentresult.OptionalResult
-
If in success state, applies the optional success value to the given consumer, otherwise does nothing.
- consumeEither(Runnable, Runnable, Consumer<? super E>) - Method in class no.gorandalum.fluentresult.BooleanResult
-
If in success state with a success value of
true
, runs the given true-runnable. - consumeEither(Runnable, Consumer<? super E>) - Method in class no.gorandalum.fluentresult.VoidResult
-
If in success state, runs the success-runnable.
- consumeEither(Consumer<? super T>, Runnable, Consumer<? super E>) - Method in class no.gorandalum.fluentresult.OptionalResult
-
If in success state with a success value, applies the success value to the given value consumer.
- consumeEither(Consumer<? super T>, Consumer<? super E>) - Method in class no.gorandalum.fluentresult.Result
-
If in success state, applies the success value to the given value consumer.
- consumeEither(Consumer<Boolean>, Consumer<? super E>) - Method in class no.gorandalum.fluentresult.BooleanResult
-
If in success state, applies the boolean success value to the given value consumer.
- consumeEither(Consumer<Optional<T>>, Consumer<? super E>) - Method in class no.gorandalum.fluentresult.OptionalResult
-
If in success state, applies the optional success value to the given success consumer.
- consumeError(Consumer<? super E>) - Method in class no.gorandalum.fluentresult.BooleanResult
-
If in error state, applies the error value to the given consumer, otherwise does nothing.
- consumeError(Consumer<? super E>) - Method in class no.gorandalum.fluentresult.OptionalResult
-
If in error state, applies the error value to the given consumer, otherwise does nothing.
- consumeError(Consumer<? super E>) - Method in class no.gorandalum.fluentresult.Result
-
If in error state, applies the error value to the given consumer, otherwise does nothing.
- consumeError(Consumer<? super E>) - Method in class no.gorandalum.fluentresult.VoidResult
-
If in error state, applies the error value to the given consumer, otherwise does nothing.
- consumeValue(Consumer<T>) - Method in class no.gorandalum.fluentresult.OptionalResult
-
If in success state with a success value, applies the success value to the given consumer, otherwise does nothing.
E
- empty() - Static method in class no.gorandalum.fluentresult.OptionalResult
-
Returns an
OptionalResult
in success state, which is empty with no success value. - equals(Object) - Method in class no.gorandalum.fluentresult.OptionalResult
- error(E) - Static method in class no.gorandalum.fluentresult.BooleanResult
-
Returns a
BooleanResult
in error state containing the given non-null
value as error value. - error(E) - Static method in class no.gorandalum.fluentresult.OptionalResult
-
Returns an
OptionalResult
in error state containing the given non-null
value as error value. - error(E) - Static method in class no.gorandalum.fluentresult.Result
-
Returns a
Result
in error state containing the given non-null
value as error value. - error(E) - Static method in class no.gorandalum.fluentresult.VoidResult
-
Returns a
VoidResult
in error state containing the given non-null
value as error value.
F
- flatConsume(Function<? super T, ? extends VoidResult<? extends E>>) - Method in class no.gorandalum.fluentresult.Result
-
If in success state, applies the success value to the given function.
- flatConsume(Function<Boolean, ? extends VoidResult<? extends E>>) - Method in class no.gorandalum.fluentresult.BooleanResult
-
If in success state, applies the boolean success value to the given function.
- flatConsume(Function<Optional<T>, ? extends VoidResult<? extends E>>) - Method in class no.gorandalum.fluentresult.OptionalResult
-
If in success state, applies the optional success value to the given function.
- flatConsumeValue(Function<T, ? extends VoidResult<? extends E>>) - Method in class no.gorandalum.fluentresult.OptionalResult
-
If in success state, applies the success value to the given function.
- flatMap(Function<? super T, ? extends Result<? extends N, ? extends E>>) - Method in class no.gorandalum.fluentresult.Result
-
If in success state, returns the
Result
from applying the given mapping function to the success value, otherwise returns the unalteredResult
in error state. - flatMap(Function<Boolean, Result<? extends N, ? extends E>>) - Method in class no.gorandalum.fluentresult.BooleanResult
-
If in success state, returns the
Result
from applying the given mapping function to the boolean success value, otherwise returns aResult
containing the error value of thisBooleanResult
. - flatMap(Function<Optional<T>, Result<? extends N, ? extends E>>) - Method in class no.gorandalum.fluentresult.OptionalResult
-
If in success state, returns the
Result
from applying the given mapping function to the optional success value, otherwise returns aResult
containing the error value of thisOptionalResult
. - flatMapToBooleanResult(Function<? super T, BooleanResult<E>>) - Method in class no.gorandalum.fluentresult.Result
-
If in success state, returns the
BooleanResult
from applying the given mapping function to the success value, otherwise returns aBooleanResult
containing the error value of thisResult
. - flatMapToBooleanResult(Function<Boolean, BooleanResult<? extends E>>) - Method in class no.gorandalum.fluentresult.BooleanResult
-
If in success state, returns the
BooleanResult
from applying the given mapping function to the boolean success value, otherwise returns the unalteredBooleanResult
in error state. - flatMapToBooleanResult(Function<Optional<? extends T>, BooleanResult<? extends E>>) - Method in class no.gorandalum.fluentresult.OptionalResult
-
If in success state, returns the
BooleanResult
from applying the given mapping function to the optional success value, otherwise returns aBooleanResult
containing the error value of thisOptionalResult
. - flatMapToOptionalResult(Function<? super T, OptionalResult<N, E>>) - Method in class no.gorandalum.fluentresult.Result
-
If in success state, returns the
OptionalResult
from applying the given mapping function to the success value, otherwise returns aOptionalResult
containing the error value of thisResult
. - flatMapToOptionalResult(Function<Boolean, OptionalResult<? extends N, ? extends E>>) - Method in class no.gorandalum.fluentresult.BooleanResult
-
If in success state, returns the
OptionalResult
from applying the given mapping function to the boolean success value, otherwise returns aOptionalResult
containing the error value of thisBooleanResult
. - flatMapToOptionalResult(Function<Optional<T>, OptionalResult<? extends N, ? extends E>>) - Method in class no.gorandalum.fluentresult.OptionalResult
-
If in success state, returns the
OptionalResult
from applying the given mapping function to the optional success value, otherwise returns the unalteredOptionalResult
in error state. - flatMapToVoidResult(Function<? super T, VoidResult<E>>) - Method in class no.gorandalum.fluentresult.Result
-
If in success state, returns the
VoidResult
from applying the given mapping function to the success value, otherwise returns aVoidResult
containing the error value of thisResult
. - flatMapToVoidResult(Function<Boolean, VoidResult<? extends E>>) - Method in class no.gorandalum.fluentresult.BooleanResult
-
If in success state, returns the
VoidResult
from applying the given mapping function to the boolean success value, otherwise returns aVoidResult
containing the error value of thisBooleanResult
. - flatMapToVoidResult(Function<Optional<? extends T>, VoidResult<? extends E>>) - Method in class no.gorandalum.fluentresult.OptionalResult
-
If in success state, returns the
VoidResult
from applying the given mapping function to the optional success value, otherwise returns aVoidResult
containing the error value of thisOptionalResult
. - flatMapValueWithBooleanResult(Function<? super T, BooleanResult<? extends E>>) - Method in class no.gorandalum.fluentresult.OptionalResult
-
If in success state with a success value, returns an
OptionalResult
from applying the given mapping function to the success value, otherwise returns the unalteredOptionalResult
which may be empty or in error state. - flatMapValueWithOptionalResult(Function<? super T, OptionalResult<? extends N, ? extends E>>) - Method in class no.gorandalum.fluentresult.OptionalResult
-
If in success state with a success value, returns the
OptionalResult
from applying the given mapping function to the success value, otherwise returns the unalteredOptionalResult
which may be empty or in error state. - flatMapValueWithResult(Function<? super T, Result<? extends N, ? extends E>>) - Method in class no.gorandalum.fluentresult.OptionalResult
-
If in success state with a success value, returns an
OptionalResult
from applying the given mapping function to the success value, otherwise returns the unalteredOptionalResult
which may be empty or in error state. - flatRecover(Function<E, BooleanResult<? extends E>>) - Method in class no.gorandalum.fluentresult.BooleanResult
-
If in error state, returns the
BooleanResult
from applying the given mapping function to the error value, otherwise returns the unalteredBooleanResult
in success state. - flatRecover(Function<E, OptionalResult<? extends N, ? extends E>>) - Method in class no.gorandalum.fluentresult.OptionalResult
-
If in error state, returns the
OptionalResult
from applying the given mapping function to the error value, otherwise returns the unalteredOptionalResult
in success state. - flatRecover(Function<E, Result<? extends N, ? extends E>>) - Method in class no.gorandalum.fluentresult.Result
-
If in error state, returns the
Result
from applying the given mapping function to the error value, otherwise returns the unalteredResult
in success state. - flatRecover(Function<E, VoidResult<? extends E>>) - Method in class no.gorandalum.fluentresult.VoidResult
-
If in error state, returns the
VoidResult
from applying the given mapping function to the error value, otherwise returns the unalteredVoidResult
in success state. - flatReplace(Supplier<Result<? extends N, ? extends E>>) - Method in class no.gorandalum.fluentresult.VoidResult
-
If in success state, returns the
Result
provided by the given supplier, otherwise returns aResult
containing the error value of thisVoidResult
. - flatReplaceEmpty(Supplier<OptionalResult<N, E>>) - Method in class no.gorandalum.fluentresult.OptionalResult
-
If in empty success state, returns the
OptionalResult
from applying the given supplier, otherwise returns the unalteredOptionalResult
in success state with value or error state. - flatReplaceEmptyWithResult(Supplier<Result<N, E>>) - Method in class no.gorandalum.fluentresult.OptionalResult
-
If in empty success state, returns the
Result
from applying the given supplier, otherwise returns aResult
with the existing success value or error value. - flatReplaceToBooleanResult(Supplier<BooleanResult<? extends E>>) - Method in class no.gorandalum.fluentresult.VoidResult
-
If in success state, returns the
BooleanResult
provided by the given supplier, otherwise returns aBooleanResult
containing the error value of thisVoidResult
. - flatReplaceToOptionalResult(Supplier<OptionalResult<? extends N, ? extends E>>) - Method in class no.gorandalum.fluentresult.VoidResult
-
If in success state, returns the
OptionalResult
provided by the given supplier, otherwise returns anOptionalResult
containing the error value of thisVoidResult
. - flatReplaceToVoidResult(Supplier<VoidResult<? extends E>>) - Method in class no.gorandalum.fluentresult.VoidResult
-
If in success state, returns the
VoidResult
provided by the given supplier, otherwise returns the unalteredVoidResult
in error state. - flatRunIfSuccess(Supplier<? extends VoidResult<? extends E>>) - Method in class no.gorandalum.fluentresult.BooleanResult
-
If in success state, runs the given supplier.
- flatRunIfSuccess(Supplier<? extends VoidResult<? extends E>>) - Method in class no.gorandalum.fluentresult.OptionalResult
-
If in success state, runs the given supplier.
- flatRunIfSuccess(Supplier<? extends VoidResult<? extends E>>) - Method in class no.gorandalum.fluentresult.Result
-
If in success state, runs the given supplier.
- flatRunIfSuccess(Supplier<? extends VoidResult<? extends E>>) - Method in class no.gorandalum.fluentresult.VoidResult
-
If in success state, runs the given supplier.
- flatRunIfValue(Supplier<? extends VoidResult<? extends E>>) - Method in class no.gorandalum.fluentresult.OptionalResult
-
If in success state with a success value, runs the given supplier.
- fold(Function<? super T, ? extends N>, Function<? super E, ? extends N>) - Method in class no.gorandalum.fluentresult.Result
-
Retrieve a value from this
Result
by folding the states. - fold(Function<? super T, ? extends N>, Supplier<? extends N>, Function<? super E, ? extends N>) - Method in class no.gorandalum.fluentresult.OptionalResult
-
Retrieve a value from this
OptionalResult
by folding the states. - fold(Function<Boolean, ? extends N>, Function<? super E, ? extends N>) - Method in class no.gorandalum.fluentresult.BooleanResult
-
Retrieve a value from this
BooleanResult
by folding the states. - fold(Function<Optional<T>, ? extends N>, Function<? super E, ? extends N>) - Method in class no.gorandalum.fluentresult.OptionalResult
-
Retrieve a value from this
OptionalResult
by folding the states. - fold(Supplier<? extends N>, Function<? super E, ? extends N>) - Method in class no.gorandalum.fluentresult.VoidResult
-
Retrieve a value from this
VoidResult
by folding the states. - fold(Supplier<? extends N>, Supplier<? extends N>, Function<? super E, ? extends N>) - Method in class no.gorandalum.fluentresult.BooleanResult
-
Retrieve a value from this
BooleanResult
by folding the states.
H
- handle(Callable<Boolean>) - Static method in class no.gorandalum.fluentresult.BooleanResult
-
Handle the given
Callable
. - handle(Callable<Boolean>, Function<Exception, E>) - Static method in class no.gorandalum.fluentresult.BooleanResult
-
Handle the given
Callable
. - handle(Callable<Optional<T>>) - Static method in class no.gorandalum.fluentresult.OptionalResult
-
Handle the given
Callable
. - handle(Callable<Optional<T>>, Function<Exception, E>) - Static method in class no.gorandalum.fluentresult.OptionalResult
-
Handle the given
Callable
. - handle(Callable<T>) - Static method in class no.gorandalum.fluentresult.Result
-
Handle the given
Callable
. - handle(Callable<T>, Function<Exception, E>) - Static method in class no.gorandalum.fluentresult.Result
-
Handle the given
Callable
. - handle(CheckedRunnable) - Static method in class no.gorandalum.fluentresult.VoidResult
-
Handle the given
CheckedRunnable
. - handle(CheckedRunnable, Function<Exception, E>) - Static method in class no.gorandalum.fluentresult.VoidResult
-
Handle the given
CheckedRunnable
. - hashCode() - Method in class no.gorandalum.fluentresult.OptionalResult
M
- map(Function<? super T, ? extends N>) - Method in class no.gorandalum.fluentresult.Result
-
If in success state, returns a
Result
containing the result of applying the given mapping function to the success value, otherwise returns the unalteredResult
in error state. - map(Function<Boolean, ? extends N>) - Method in class no.gorandalum.fluentresult.BooleanResult
-
If in success state, returns a
Result
containing the result of applying the given mapping function to the boolean success value, otherwise returns aResult
containing the error value of thisBooleanResult
. - map(Function<Optional<T>, ? extends N>) - Method in class no.gorandalum.fluentresult.OptionalResult
-
If in success state, returns a
Result
containing the result of applying the given mapping function to the optional success value of thisOptionalResult
, otherwise returns aResult
containing the error value of thisOptionalResult
. - mapError(Function<? super E, ? extends N>) - Method in class no.gorandalum.fluentresult.BooleanResult
-
If in error state, returns a
BooleanResult
containing the result of applying the given mapping function to the error value, otherwise returns the unalteredBooleanResult
in success state. - mapError(Function<? super E, ? extends N>) - Method in class no.gorandalum.fluentresult.OptionalResult
-
If in error state, returns a
OptionalResult
containing the result of applying the given mapping function to the error value, otherwise returns the unalteredOptionalResult
in success state. - mapError(Function<? super E, ? extends N>) - Method in class no.gorandalum.fluentresult.Result
-
If in error state, returns a
Result
containing the result of applying the given mapping function to the error value, otherwise returns the unalteredResult
in success state. - mapError(Function<? super E, ? extends N>) - Method in class no.gorandalum.fluentresult.VoidResult
-
If in error state, returns a
VoidResult
containing the result of applying the given mapping function to the error value, otherwise returns the unalteredVoidResult
in success state. - mapToBoolean(Function<? super T, Boolean>) - Method in class no.gorandalum.fluentresult.Result
-
If in success state, returns a
BooleanResult
containing the result of applying the given mapping function to the success value, otherwise returns aBooleanResult
containing the error value of thisResult
. - mapToBoolean(Function<Boolean, Boolean>) - Method in class no.gorandalum.fluentresult.BooleanResult
-
If in success state, returns a
BooleanResult
containing the result of applying the given mapping function to the success value, otherwise returns the unalteredBooleanResult
in error state. - mapToBoolean(Function<Optional<T>, Boolean>) - Method in class no.gorandalum.fluentresult.OptionalResult
-
If in success state, returns a
BooleanResult
containing the result of applying the given mapping function to the optional success value, otherwise returns aBooleanResult
containing the error value of thisOptionalResult
. - mapToOptional(Function<? super T, Optional<N>>) - Method in class no.gorandalum.fluentresult.Result
-
If in success state, returns a
OptionalResult
containing the result of applying the given mapping function to the success value, otherwise returns aOptionalResult
containing the error value of thisResult
. - mapToOptional(Function<Boolean, ? extends Optional<? extends N>>) - Method in class no.gorandalum.fluentresult.BooleanResult
-
If in success state, returns a
OptionalResult
containing the result of applying the given mapping function to the boolean success value, otherwise returns aOptionalResult
containing the error value of thisBooleanResult
. - mapToOptional(Function<Optional<T>, ? extends Optional<? extends N>>) - Method in class no.gorandalum.fluentresult.OptionalResult
-
If in success state, returns a
OptionalResult
containing the result of applying the given mapping function to the optional success value, otherwise returns the unalteredOptionalResult
in error state. - mapValue(Function<? super T, ? extends N>) - Method in class no.gorandalum.fluentresult.OptionalResult
-
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 unalteredOptionalResult
which may be empty or in error state. - mapValueToOptional(Function<? super T, Optional<N>>) - Method in class no.gorandalum.fluentresult.OptionalResult
-
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 unalteredOptionalResult
which may be empty or in error state.
N
- no.gorandalum.fluentresult - package no.gorandalum.fluentresult
O
- OptionalResult<T,
E> - Class in no.gorandalum.fluentresult -
A result object which either is in success state, where it may contain a non-
null
success value or be empty, or it may be in error state containing a non-null
error value. - orElse(Boolean) - Method in class no.gorandalum.fluentresult.BooleanResult
-
If in success state, returns the boolean success value, otherwise returns
other
. - orElse(Optional<T>) - Method in class no.gorandalum.fluentresult.OptionalResult
-
If in success state, returns the optional success value, otherwise returns
other
. - orElse(T) - Method in class no.gorandalum.fluentresult.Result
-
If in success state, returns the success value, otherwise returns
other
. - orElseFalse() - Method in class no.gorandalum.fluentresult.BooleanResult
-
If in success state, returns the boolean success value, otherwise returns
false
. - orElseGet(Function<? super E, ? extends Optional<T>>) - Method in class no.gorandalum.fluentresult.OptionalResult
-
If in success state, returns the optional success value, otherwise returns the value returned from the given function.
- orElseGet(Function<? super E, ? extends T>) - Method in class no.gorandalum.fluentresult.Result
-
If in success state, returns the success value, otherwise returns the value returned from the given function.
- orElseGet(Function<? super E, Boolean>) - Method in class no.gorandalum.fluentresult.BooleanResult
-
If in success state, returns the boolean success value, otherwise returns the value returned from the given function.
- orElseThrow(Function<? super E, ? extends X>) - Method in class no.gorandalum.fluentresult.BooleanResult
-
If in success state, returns the boolean success value, otherwise throws the exception returned by the given function.
- orElseThrow(Function<? super E, ? extends X>) - Method in class no.gorandalum.fluentresult.OptionalResult
-
If in success state, returns the optional success value, otherwise throws the exception returned by the given function.
- orElseThrow(Function<? super E, ? extends X>) - Method in class no.gorandalum.fluentresult.Result
-
If in success state, returns the success value, otherwise throws the exception returned by the given function.
- orElseThrow(Function<? super E, ? extends X>) - Method in class no.gorandalum.fluentresult.VoidResult
-
If in success state, does nothing, otherwise throws the exception returned by the given function.
- orElseTrue() - Method in class no.gorandalum.fluentresult.BooleanResult
-
If in success state, returns the boolean success value, otherwise returns
true
.
R
- recover() - Method in class no.gorandalum.fluentresult.VoidResult
-
If in error state, returns a new
VoidResult
in success state, otherwise returns the unalteredVoidResult
in success state. - recover(Function<E, Boolean>) - Method in class no.gorandalum.fluentresult.BooleanResult
-
If in error state, returns a
BooleanResult
with the success value from applying the given mapping function to the error value, otherwise returns the unalteredBooleanResult
in success state. - recover(Function<E, Optional<T>>) - Method in class no.gorandalum.fluentresult.OptionalResult
-
If in error state, returns a
OptionalResult
with the success value from applying the given mapping function to the error value, otherwise returns the unalteredOptionalResult
in success state. - recover(Function<E, T>) - Method in class no.gorandalum.fluentresult.Result
-
If in error state, returns a
Result
with the success value from applying the given mapping function to the error value, otherwise returns the unalteredResult
in success state. - replace(Supplier<? extends N>) - Method in class no.gorandalum.fluentresult.VoidResult
-
If in success state, returns a
Result
containing the value provided by the given supplier, otherwise returns aResult
containing the error value of thisVoidResult
. - replaceWithBoolean(Supplier<Boolean>) - Method in class no.gorandalum.fluentresult.VoidResult
-
If in success state, returns a
BooleanResult
containing the boolean value provided by the given supplier, otherwise returns aBooleanResult
containing the error value of thisVoidResult
. - replaceWithOptional(Supplier<Optional<? extends N>>) - Method in class no.gorandalum.fluentresult.VoidResult
-
If in success state, returns a
OptionalResult
containing the optional value provided by given supplier, otherwise returns aOptionalResult
containing the error value of thisVoidResult
. - Result<T,
E> - Class in no.gorandalum.fluentresult -
A result object which either is in success state containing a non-
null
success value, or in error state containing a non-null
error value. - run() - Method in interface no.gorandalum.fluentresult.CheckedRunnable
- run(Runnable) - Method in class no.gorandalum.fluentresult.BooleanResult
-
Deprecated.
- run(Runnable) - Method in class no.gorandalum.fluentresult.OptionalResult
-
Deprecated.use
OptionalResult.runAlways(java.lang.Runnable)
instead for clarity - run(Runnable) - Method in class no.gorandalum.fluentresult.Result
-
Deprecated.use
Result.runAlways(java.lang.Runnable)
instead for clarity - run(Runnable) - Method in class no.gorandalum.fluentresult.VoidResult
-
Deprecated.use
VoidResult.runAlways(java.lang.Runnable)
instead for clarity - runAlways(Runnable) - Method in class no.gorandalum.fluentresult.BooleanResult
-
Runs the given runnable, no matter the state.
- runAlways(Runnable) - Method in class no.gorandalum.fluentresult.OptionalResult
-
Runs the given runnable, no matter the state.
- runAlways(Runnable) - Method in class no.gorandalum.fluentresult.Result
-
Runs the given runnable, no matter the state.
- runAlways(Runnable) - Method in class no.gorandalum.fluentresult.VoidResult
-
Runs the given runnable, no matter the state.
- runEither(Runnable, Runnable) - Method in class no.gorandalum.fluentresult.BooleanResult
-
If in success state, runs the given success runnable.
- runEither(Runnable, Runnable) - Method in class no.gorandalum.fluentresult.OptionalResult
-
If in success state, runs the given success runnable.
- runEither(Runnable, Runnable) - Method in class no.gorandalum.fluentresult.Result
-
If in success state, runs the given success runnable.
- runEither(Runnable, Runnable) - Method in class no.gorandalum.fluentresult.VoidResult
-
If in success state, runs the given success runnable.
- runEither(Runnable, Runnable, Runnable) - Method in class no.gorandalum.fluentresult.BooleanResult
-
If in success state with a success value of
true
, runs the given true-runnable. - runEither(Runnable, Runnable, Runnable) - Method in class no.gorandalum.fluentresult.OptionalResult
-
If in success state with a success value, runs the given value runnable.
- runIfEmpty(Runnable) - Method in class no.gorandalum.fluentresult.OptionalResult
-
If in empty success state with no success value, runs the given runnable, otherwise does nothing.
- runIfError(Runnable) - Method in class no.gorandalum.fluentresult.BooleanResult
-
If in error state, runs the given runnable, otherwise does nothing.
- runIfError(Runnable) - Method in class no.gorandalum.fluentresult.OptionalResult
-
If in error state, runs the given runnable, otherwise does nothing.
- runIfError(Runnable) - Method in class no.gorandalum.fluentresult.Result
-
If in error state, runs the given runnable, otherwise does nothing.
- runIfError(Runnable) - Method in class no.gorandalum.fluentresult.VoidResult
-
If in error state, runs the given runnable, otherwise does nothing.
- runIfFalse(Runnable) - Method in class no.gorandalum.fluentresult.BooleanResult
-
If in success state with a success value of
false
, runs the given runnable, otherwise does nothing. - runIfNoValue(Runnable) - Method in class no.gorandalum.fluentresult.OptionalResult
-
If in empty success state or error state, runs the given runnable, otherwise does nothing.
- runIfSuccess(Runnable) - Method in class no.gorandalum.fluentresult.BooleanResult
-
If in success state, runs the given runnable, otherwise does nothing.
- runIfSuccess(Runnable) - Method in class no.gorandalum.fluentresult.OptionalResult
-
If in success state, runs the given runnable, otherwise does nothing.
- runIfSuccess(Runnable) - Method in class no.gorandalum.fluentresult.Result
-
If in success state, runs the given runnable, otherwise does nothing.
- runIfSuccess(Runnable) - Method in class no.gorandalum.fluentresult.VoidResult
-
If in success state, runs the given runnable, otherwise does nothing.
- runIfTrue(Runnable) - Method in class no.gorandalum.fluentresult.BooleanResult
-
If in success state with a success value of
true
, runs the given runnable, otherwise does nothing. - runIfValue(Runnable) - Method in class no.gorandalum.fluentresult.OptionalResult
-
If in success state with a success value, runs the given runnable, otherwise does nothing.
S
- success() - Static method in class no.gorandalum.fluentresult.VoidResult
-
Returns a
VoidResult
in success state. - success(boolean) - Static method in class no.gorandalum.fluentresult.BooleanResult
-
Returns a
BooleanResult
in success state containing the given non-null
boolean value as success value. - success(Optional<? extends T>) - Static method in class no.gorandalum.fluentresult.OptionalResult
-
Returns an
OptionalResult
in success state containing the given non-null
value as success value. - success(T) - Static method in class no.gorandalum.fluentresult.OptionalResult
-
Returns an
OptionalResult
in success state containing the given non-null
value as success value. - success(T) - Static method in class no.gorandalum.fluentresult.Result
-
Returns a
Result
in success state containing the given non-null
value as success value. - successFalse() - Static method in class no.gorandalum.fluentresult.BooleanResult
-
Returns a
BooleanResult
in success state containingfalse
as the boolean success value. - successNullable(T) - Static method in class no.gorandalum.fluentresult.OptionalResult
-
Returns an
OptionalResult
in success state either containing the given value as success value, or empty if the given value is null. - successTrue() - Static method in class no.gorandalum.fluentresult.BooleanResult
-
Returns a
BooleanResult
in success state containingtrue
as the boolean success value.
T
- toOptionalResult() - Method in class no.gorandalum.fluentresult.BooleanResult
-
Transforms this
BooleanResult
to anOptionalResult
. - toOptionalResult() - Method in class no.gorandalum.fluentresult.Result
-
Transforms this
Result
to anOptionalResult
. - toOptionalResult() - Method in class no.gorandalum.fluentresult.VoidResult
-
Transforms this
VoidResult
to anOptionalResult
. - toResult(Supplier<? extends E>) - Method in class no.gorandalum.fluentresult.OptionalResult
-
Transforms this
OptionalResult
to aResult
. - toString() - Method in class no.gorandalum.fluentresult.OptionalResult
- toVoidResult() - Method in class no.gorandalum.fluentresult.BooleanResult
-
Transforms this
BooleanResult
to aVoidResult
. - toVoidResult() - Method in class no.gorandalum.fluentresult.OptionalResult
-
Transforms this
OptionalResult
to aVoidResult
. - toVoidResult() - Method in class no.gorandalum.fluentresult.Result
-
Transforms this
Result
to aVoidResult
.
V
- valueOrElse(T) - Method in class no.gorandalum.fluentresult.OptionalResult
-
If in success state with a success value, returns the success value, otherwise returns
other
. - valueOrElseGet(Supplier<? extends T>) - Method in class no.gorandalum.fluentresult.OptionalResult
-
If in success state with a success value, returns the success value, otherwise returns the value returned from the given function.
- valueOrElseThrow(Supplier<? extends X>) - Method in class no.gorandalum.fluentresult.OptionalResult
-
If in success state with a success value, returns the success value, otherwise throws the exception returned by the given function.
- verify(Function<? super T, ? extends VoidResult<? extends E>>) - Method in class no.gorandalum.fluentresult.Result
-
If in success state, verifies the success value of this
Result
by mapping it to aVoidResult
. - verify(Function<Boolean, ? extends VoidResult<? extends E>>) - Method in class no.gorandalum.fluentresult.BooleanResult
-
If in success state, verifies the success value of this
BooleanResult
by mapping it to aVoidResult
. - verify(Function<Optional<T>, ? extends VoidResult<? extends E>>) - Method in class no.gorandalum.fluentresult.OptionalResult
-
If in success state, verifies the success value of this
OptionalResult
by mapping it to aVoidResult
. - verify(Predicate<? super T>, Supplier<? extends E>) - Method in class no.gorandalum.fluentresult.Result
-
If in success state, verifies the success value of this
Result
by testing it with the given predicate. - verify(Predicate<Boolean>, Supplier<? extends E>) - Method in class no.gorandalum.fluentresult.BooleanResult
-
If in success state, verifies the boolean success value of this
BooleanResult
by testing it with the given predicate. - verify(Predicate<Optional<T>>, Supplier<? extends E>) - Method in class no.gorandalum.fluentresult.OptionalResult
-
If in success state, verifies the optional success value of this
OptionalResult
by testing it with the given predicate. - verifyValue(Function<? super T, ? extends VoidResult<? extends E>>) - Method in class no.gorandalum.fluentresult.OptionalResult
-
If in non-empty success state, verifies the success value of this
OptionalResult
by mapping it to aVoidResult
. - verifyValue(Predicate<? super T>, Supplier<? extends E>) - Method in class no.gorandalum.fluentresult.OptionalResult
-
If in success state with a success value, verifies the success value of this
OptionalResult
by testing it with the given predicate. - VoidResult<E> - Class in no.gorandalum.fluentresult
-
A result object which either is in success state with no value, or in error state containing a non-
null
error value.
All Classes and Interfaces|All Packages
runAlways(java.lang.Runnable)
instead for clarity