Uses of Class
no.gorandalum.fluentresult.Result

  • Uses of Result in no.gorandalum.fluentresult

    Methods in no.gorandalum.fluentresult that return Result
    Modifier and Type
    Method
    Description
    Result.consume(Consumer<? super T> consumer)
    If in success state, applies the success value to the given consumer, otherwise does nothing.
    Result.consumeEither(Consumer<? super T> valueConsumer, Consumer<? super E> errorConsumer)
    If in success state, applies the success value to the given value consumer.
    Result.consumeError(Consumer<? super E> errorConsumer)
    If in error state, applies the error value to the given consumer, otherwise does nothing.
    static <T, E> Result<T,E>
    Result.error(E value)
    Returns a Result in error state containing the given non-null value as error value.
    Result.flatConsume(Function<? super T,? extends VoidResult<? extends E>> function)
    If in success state, applies the success value to the given function.
    <N> Result<N,E>
    BooleanResult.flatMap(Function<Boolean,Result<? extends N,? extends E>> function)
    If in success state, returns the Result from applying the given mapping function to the boolean success value, otherwise returns a Result containing the error value of this BooleanResult.
    <N> Result<N,E>
    OptionalResult.flatMap(Function<Optional<T>,Result<? extends N,? extends E>> function)
    If in success state, returns the Result from applying the given mapping function to the optional success value, otherwise returns a Result containing the error value of this OptionalResult.
    <N> Result<N,E>
    Result.flatMap(Function<? super T,? extends Result<? extends N,? extends E>> function)
    If in success state, returns the Result from applying the given mapping function to the success value, otherwise returns the unaltered Result in error state.
    <N> Result<N,E>
    Result.flatRecover(Function<E,Result<? extends N,? extends E>> function)
    If in error state, returns the Result from applying the given mapping function to the error value, otherwise returns the unaltered Result in success state.
    <N> Result<N,E>
    VoidResult.flatReplace(Supplier<Result<? extends N,? extends E>> supplier)
    If in success state, returns the Result provided by the given supplier, otherwise returns a Result containing the error value of this VoidResult.
    <N> Result<N,E>
    OptionalResult.flatReplaceEmptyWithResult(Supplier<Result<N,E>> supplier)
    If in empty success state, returns the Result from applying the given supplier, otherwise returns a Result with the existing success value or error value.
    Result.flatRunIfSuccess(Supplier<? extends VoidResult<? extends E>> supplier)
    If in success state, runs the given supplier.
    static <T> Result<T,Exception>
    Result.handle(Callable<T> callable)
    Handle the given Callable.
    static <T, E> Result<T,E>
    Result.handle(Callable<T> callable, Function<Exception,E> exceptionMapper)
    Handle the given Callable.
    <N> Result<N,E>
    BooleanResult.map(Function<Boolean,? extends N> function)
    If in success state, returns a Result containing the result of applying the given mapping function to the boolean success value, otherwise returns a Result containing the error value of this BooleanResult.
    <N> Result<N,E>
    OptionalResult.map(Function<Optional<T>,? extends N> function)
    If in success state, returns a Result containing the result of applying the given mapping function to the optional success value of this OptionalResult, otherwise returns a Result containing the error value of this OptionalResult.
    <N> Result<N,E>
    Result.map(Function<? super T,? extends N> function)
    If in success state, returns a Result containing the result of applying the given mapping function to the success value, otherwise returns the unaltered Result in error state.
    <N> Result<T,N>
    Result.mapError(Function<? super E,? extends N> function)
    If in error state, returns a Result containing the result of applying the given mapping function to the error value, otherwise returns the unaltered Result in success state.
    Result.recover(Function<E,T> function)
    If in error state, returns a Result with the success value from applying the given mapping function to the error value, otherwise returns the unaltered Result in success state.
    <N> Result<N,E>
    VoidResult.replace(Supplier<? extends N> supplier)
    If in success state, returns a Result containing the value provided by the given supplier, otherwise returns a Result containing the error value of this VoidResult.
    Result.run(Runnable runnable)
    Deprecated.
    use runAlways(java.lang.Runnable) instead for clarity
    Result.runAlways(Runnable runnable)
    Runs the given runnable, no matter the state.
    Result.runEither(Runnable successRunnable, Runnable errorRunnable)
    If in success state, runs the given success runnable.
    Result.runIfError(Runnable runnable)
    If in error state, runs the given runnable, otherwise does nothing.
    Result.runIfSuccess(Runnable runnable)
    If in success state, runs the given runnable, otherwise does nothing.
    static <T, E> Result<T,E>
    Result.success(T value)
    Returns a Result in success state containing the given non-null value as success value.
    OptionalResult.toResult(Supplier<? extends E> errorSupplier)
    Transforms this OptionalResult to a Result.
    Result.verify(Function<? super T,? extends VoidResult<? extends E>> function)
    If in success state, verifies the success value of this Result by mapping it to a VoidResult.
    Result.verify(Predicate<? super T> predicate, Supplier<? extends E> errorSupplier)
    If in success state, verifies the success value of this Result by testing it with the given predicate.
    Method parameters in no.gorandalum.fluentresult with type arguments of type Result
    Modifier and Type
    Method
    Description
    <N> Result<N,E>
    BooleanResult.flatMap(Function<Boolean,Result<? extends N,? extends E>> function)
    If in success state, returns the Result from applying the given mapping function to the boolean success value, otherwise returns a Result containing the error value of this BooleanResult.
    <N> Result<N,E>
    OptionalResult.flatMap(Function<Optional<T>,Result<? extends N,? extends E>> function)
    If in success state, returns the Result from applying the given mapping function to the optional success value, otherwise returns a Result containing the error value of this OptionalResult.
    <N> Result<N,E>
    Result.flatMap(Function<? super T,? extends Result<? extends N,? extends E>> function)
    If in success state, returns the Result from applying the given mapping function to the success value, otherwise returns the unaltered Result in error state.
    OptionalResult.flatMapValueWithResult(Function<? super T,Result<? extends N,? extends E>> function)
    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.
    <N> Result<N,E>
    Result.flatRecover(Function<E,Result<? extends N,? extends E>> function)
    If in error state, returns the Result from applying the given mapping function to the error value, otherwise returns the unaltered Result in success state.
    <N> Result<N,E>
    VoidResult.flatReplace(Supplier<Result<? extends N,? extends E>> supplier)
    If in success state, returns the Result provided by the given supplier, otherwise returns a Result containing the error value of this VoidResult.
    <N> Result<N,E>
    OptionalResult.flatReplaceEmptyWithResult(Supplier<Result<N,E>> supplier)
    If in empty success state, returns the Result from applying the given supplier, otherwise returns a Result with the existing success value or error value.