| Modifier and Type | Method and Description |
|---|---|
static <T> Fun.ThrowingFunction<T,Nothing> |
Fun.throwingVoidToNothing1(@NotNull Fun.ThrowingConsumer<? super T> mayThrowOnAccept)
Parallel method to
Nothing.voidToNothing1(Consumer), for transforming a Fun.ThrowingConsumer to a
Fun.ThrowingFunction that returns Nothing. |
| Modifier and Type | Method and Description |
|---|---|
static <M,T,R> Function<T,M> |
Fun.composeTry1(@NotNull Function<? super R,? extends M> monoidSuccess,
@NotNull Function<? super Exception,? extends M> monoidError,
@NotNull Fun.ThrowingFunction<? super T,? extends R> mayThrowOnApply)
|
static <M,T,R> Function<T,M> |
Fun.composeTry1(@NotNull Function<? super R,? extends M> monadUnit,
@NotNull Supplier<? extends M> monadZero,
@NotNull Fun.ThrowingFunction<? super T,? extends R> mayThrowOnApply,
@Nullable BiConsumer<? super T,? super Exception> onError)
|
static <R> List<R> |
JavaxJson.parseFromArray(@NotNull javax.json.JsonArray jsonArray,
Fun.ThrowingFunction<String,R> parser,
@Nullable BiConsumer<String,Exception> errorConsumer)
Parse string elements of an array into arbitrary objects, (like URLs).
|
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 <T,R> Function<T,R> |
Fun.tryOrDefault1(@NotNull Fun.ThrowingFunction<? super T,R> mayThrowOnApply,
R defaultValue)
Transform a
Fun.ThrowingFunction to a Function, providing a default value to return if
an exception is thrown. |
static <T,R> Function<T,Optional<R>> |
Fun.tryOrOptional1(@NotNull Fun.ThrowingFunction<? super T,R> mayThrowOnApply)
Transform a
Fun.ThrowingFunction to a Function of the same input type, with the output type wrapped in
an Optional. |
static <T,R> Function<T,R> |
Fun.uncheck1(@NotNull Fun.ThrowingFunction<? super T,? extends R> mayThrowOnApply)
Transform a
Fun.ThrowingFunction to an unchecked Function of the same input and output type parameters. |
Copyright © 2017–2020. All rights reserved.