| Package | Description |
|---|---|
| net.digitalid.utility.functional.failable |
Provides failable interfaces for functional programming.
|
| net.digitalid.utility.functional.interfaces |
Provides interfaces for functional programming.
|
| Modifier and Type | Method and Description |
|---|---|
default @Nonnull UnaryFunction<INPUT,OUTPUT> |
FailableUnaryFunction.suppressExceptions()
Returns a function that suppresses the exceptions of this function and returns null instead.
|
default @Nonnull UnaryFunction<INPUT,OUTPUT> |
FailableUnaryFunction.suppressExceptions(@Nonnull Consumer<? super Exception> handler)
Returns a function that catches the exceptions of this function, passes them to the given exception handler and returns null instead.
|
default @Nonnull UnaryFunction<INPUT,OUTPUT> |
FailableUnaryFunction.suppressExceptions(@Nonnull Consumer<? super Exception> handler,
OUTPUT defaultOutput)
Returns a function that catches the exceptions of this function, passes them to the given exception handler and returns the given default output instead.
|
default @Nonnull UnaryFunction<INPUT,OUTPUT> |
FailableUnaryFunction.suppressExceptions(OUTPUT defaultOutput)
Returns a function that suppresses the exceptions of this function and returns the given default output instead.
|
| Modifier and Type | Interface and Description |
|---|---|
interface |
UnaryOperator<TYPE>
This functional interface models a unary operator that maps an object of type
TYPE to another object of type TYPE. |
| Modifier and Type | Method and Description |
|---|---|
default <INITIAL_INPUT> |
UnaryFunction.after(@Nonnull UnaryFunction<? super INITIAL_INPUT,? extends INPUT> function)
Returns the composition of the given function followed by this function.
|
default @Nonnull UnaryFunction<INPUT,Void> |
Consumer.asFunction() |
default @Nonnull UnaryFunction<Object,OUTPUT> |
Producer.asFunction() |
default @Nonnull UnaryFunction<INPUT,Boolean> |
Predicate.asFunction() |
default <FINAL_OUTPUT> |
UnaryFunction.before(@Nonnull UnaryFunction<? super OUTPUT,? extends FINAL_OUTPUT> function)
Returns the composition of this function followed by the given function.
|
static <OUTPUT> @Nonnull UnaryFunction<Object,OUTPUT> |
UnaryFunction.constant(OUTPUT output)
Returns a function that always returns the given output.
|
default @Nonnull UnaryFunction<INPUT,OUTPUT> |
UnaryFunction.propagateNull() |
default @Nonnull UnaryFunction<INPUT,OUTPUT> |
UnaryFunction.replaceNull(OUTPUT defaultValue) |
static <KEY,VALUE> |
UnaryFunction.with(@Nonnull Map<? super KEY,? extends VALUE> map)
Returns a function that looks up the result in the given map or returns null if the input is not found in the map.
|
static <KEY,VALUE> |
UnaryFunction.with(@Nonnull Map<? super KEY,? extends VALUE> map,
VALUE defaultValue)
Returns a function that looks up the result in the given map or returns the given default value if the input is not found in the map.
|
| Modifier and Type | Method and Description |
|---|---|
default <INITIAL_INPUT> |
Consumer.after(@Nonnull UnaryFunction<? super INITIAL_INPUT,? extends INPUT> function)
Returns the composition of the given function followed by this consumer.
|
default <INITIAL_INPUT> |
UnaryFunction.after(@Nonnull UnaryFunction<? super INITIAL_INPUT,? extends INPUT> function)
Returns the composition of the given function followed by this function.
|
default <INITIAL_INPUT> |
Predicate.after(@Nonnull UnaryFunction<? super INITIAL_INPUT,? extends INPUT> function)
Returns the composition of the given function followed by this predicate.
|
default <INITIAL_INPUT0,INITIAL_INPUT1> |
BinaryFunction.after(@Nonnull UnaryFunction<? super INITIAL_INPUT0,? extends INPUT0> function0,
@Nonnull UnaryFunction<? super INITIAL_INPUT1,? extends INPUT1> function1)
Returns the composition of the given functions followed by this function.
|
default <INITIAL_INPUT0,INITIAL_INPUT1> |
BinaryFunction.after(@Nonnull UnaryFunction<? super INITIAL_INPUT0,? extends INPUT0> function0,
@Nonnull UnaryFunction<? super INITIAL_INPUT1,? extends INPUT1> function1)
Returns the composition of the given functions followed by this function.
|
default <FINAL_OUTPUT> |
BinaryFunction.before(@Nonnull UnaryFunction<? super OUTPUT,? extends FINAL_OUTPUT> function)
Returns the composition of this function followed by the given function.
|
default <FINAL_OUTPUT> |
UnaryFunction.before(@Nonnull UnaryFunction<? super OUTPUT,? extends FINAL_OUTPUT> function)
Returns the composition of this function followed by the given function.
|
default <FINAL_OUTPUT> |
Producer.before(@Nonnull UnaryFunction<? super OUTPUT,? extends FINAL_OUTPUT> function)
Returns the composition of this producer followed by the given function.
|
Copyright © 2017. All rights reserved.