| Modifier and Type | Method and Description |
|---|---|
static <V> Result<V> |
Result.failure(@NotNull Exception e) |
static <V> Result<V> |
Result.failure(@NotNull RuntimeException e) |
static <V> Result<V> |
Result.failure(String message) |
static <V> Result<V> |
Result.failure(@NotNull String message,
@NotNull Exception e) |
abstract <W> @NotNull Result<W> |
Result.flatMap(@NotNull Function<? super V,Result<W>> f)
Flat-map it.
|
abstract <W> @NotNull Result<W> |
Result.map(@NotNull Function<? super V,W> f)
Map it.
|
abstract Result<V> |
Result.orElse(@NotNull Supplier<Result<V>> defaultValue) |
static <V> Result<V> |
Result.success(V value) |
abstract Result<V> |
Result.teeLogError() |
| Modifier and Type | Method and Description |
|---|---|
static <V> Collector<Result<V>,Stream.Builder<Result<V>>,Stream<Result<V>>> |
Result.logAndRestream() |
static <V> Collector<Result<V>,Stream.Builder<Result<V>>,Stream<Result<V>>> |
Result.logAndRestream() |
static <V> Collector<Result<V>,Stream.Builder<Result<V>>,Stream<Result<V>>> |
Result.logAndRestream() |
static <V> Collector<Result<V>,Stream.Builder<Result<V>>,Stream<Result<V>>> |
Result.logAndRestream(@NotNull String message) |
static <V> Collector<Result<V>,Stream.Builder<Result<V>>,Stream<Result<V>>> |
Result.logAndRestream(@NotNull String message) |
static <V> Collector<Result<V>,Stream.Builder<Result<V>>,Stream<Result<V>>> |
Result.logAndRestream(@NotNull String message) |
static <R> Supplier<Result<R>> |
Fun.result0(@NotNull Fun.ThrowingSupplier<? extends R> mayThrowOnGet)
Transform a
Fun.ThrowingSupplier to a Supplier of Result whose success type parameter is the
same as the type parameter of the Fun.ThrowingSupplier. |
static <T,R> Function<T,Result<R>> |
Fun.result1(@NotNull Fun.ThrowingFunction<? super T,? extends R> mayThrowOnApply)
Transform a
Fun.ThrowingFunction to a Function over the same input type parameter, which returns a
Result whose success type parameter is the same as the output type of the Fun.ThrowingFunction. |
static <K,V,R> BiFunction<K,V,Result<R>> |
Fun.result2(@NotNull Fun.ThrowingBiFunction<? super K,? super V,? extends R> mayThrowOnApply)
Transform a
Fun.ThrowingBiFunction to a BiFunction over the same input type parameters, which returns
a Result whose success type parameter is the same as the output type of the Fun.ThrowingBiFunction. |
static <T> Function<T,Result<Nothing>> |
Fun.resultNothing1(@NotNull Fun.ThrowingConsumer<? super T> mayThrowOnAccept)
Transform a
Fun.ThrowingConsumer to a Function over the same input type parameter, but which returns
a Result of success type Nothing. |
static <K,V> BiFunction<K,V,Result<Nothing>> |
Fun.resultNothing2(@NotNull Fun.ThrowingBiConsumer<? super K,? super V> mayThrowOnAccept)
Transform a
Fun.ThrowingBiConsumer to a BiFunction over the same input type parameters, but which returns
a Result of success type Nothing. |
static <V,R,A> Collector<Result<V>,Result.Builder<V,A>,Result<R>> |
Result.tryCollect(@NotNull Collector<V,A,R> collector)
Create a collector that accumulates a stream of Results into a single Result containing either:
1.
|
static <V,R,A> Collector<Result<V>,Result.Builder<V,A>,Result<R>> |
Result.tryCollect(@NotNull Collector<V,A,R> collector)
Create a collector that accumulates a stream of Results into a single Result containing either:
1.
|
| Modifier and Type | Method and Description |
|---|---|
void |
Result.Builder.accept(Result<V> valueResult) |
Copyright © 2017–2020. All rights reserved.