| Package | Description |
|---|---|
| io.buybrain.util |
| Modifier and Type | Method and Description |
|---|---|
<R> Result<R,?> |
Result.andThen(ThrowingConsumer<T> op)
If the current value is OK, pass it to a consumer and return an empty OK result.
|
<R> Result<R,?> |
Result.andThen(ThrowingRunnable op)
If the current value is OK, call a runnable and return an empty OK result.
|
<R> Result<R,?> |
Result.andThen(ThrowingSupplier<Result<R,?>> op)
If the current value is OK, yield a new Result by calling a supplier.
|
Result<?,?> |
Result.andThenTry(ThrowingConsumer<T> op)
If the current value is OK, pass it to a consumer and return an empty OK result.
|
<R> Result<R,?> |
Result.andThenTry(ThrowingRunnable op)
If the current value is OK, call a runnable and return an empty OK result.
|
<R> Result<R,?> |
Result.andThenTry(ThrowingSupplier<R> op)
If the current value is OK, yield a new Result by calling a supplier.
|
static <T,E extends Throwable> |
Result.err(E error) |
<R> Result<R,?> |
Result.map(ThrowingFunction<T,Result<R,?>> op)
If the current value is OK, transform it into a new Result by applying a function.
|
Result<T,?> |
Result.mapErr(ThrowingFunction<E,Result<T,?>> op) |
static <T> Result<T,?> |
Result.ok() |
static <T> Result<T,?> |
Result.ok(T value) |
Result<T,?> |
Result.orElse(T defaultValue)
If the current value is an error, transform it into a default value.
|
Result<T,?> |
Result.orElse(ThrowingConsumer<E> op) |
Result<T,?> |
Result.orElse(ThrowingRunnable op) |
Result<T,?> |
Result.orElse(ThrowingSupplier<Result<T,?>> op) |
Result<T,?> |
Result.orElseTry(ThrowingConsumer<E> op) |
Result<T,?> |
Result.orElseTry(ThrowingRunnable op) |
Result<T,?> |
Result.orElseTry(ThrowingSupplier<T> op) |
static <T> Result<T,?> |
Result.trying(ThrowingRunnable op) |
static <T> Result<T,?> |
Result.trying(ThrowingSupplier<T> op) |
<R> Result<R,?> |
Result.tryMap(ThrowingFunction<T,R> op)
If the current value is OK, transform it into a new Result by applying a function.
|
Result<T,?> |
Result.tryMapErr(ThrowingFunction<E,T> op) |
| Modifier and Type | Method and Description |
|---|---|
<R> Result<R,?> |
Result.andThen(ThrowingSupplier<Result<R,?>> op)
If the current value is OK, yield a new Result by calling a supplier.
|
<R> Result<R,?> |
Result.map(ThrowingFunction<T,Result<R,?>> op)
If the current value is OK, transform it into a new Result by applying a function.
|
Result<T,?> |
Result.mapErr(ThrowingFunction<E,Result<T,?>> op) |
Result<T,?> |
Result.orElse(ThrowingSupplier<Result<T,?>> op) |
Copyright © 2017. All rights reserved.