@Immutable @Functional public interface BinaryFunction<INPUT0,INPUT1,OUTPUT> extends FailableBinaryFunction<INPUT0,INPUT1,OUTPUT,RuntimeException>
INPUT0 and an object of type INPUT1 to an object of type OUTPUT.| Modifier and Type | Method and Description |
|---|---|
default <INITIAL_INPUT0,INITIAL_INPUT1> |
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> |
before(@Nonnull UnaryFunction<? super OUTPUT,? extends FINAL_OUTPUT> function)
Returns the composition of this function followed by the given function.
|
static <OUTPUT> @Nonnull BinaryFunction<Object,Object,OUTPUT> |
constant(OUTPUT output)
Returns a binary function that always returns the given output.
|
default @Nonnull BinaryFunction<INPUT0,INPUT1,OUTPUT> |
propagateNull()
Returns a new function based on this function that propagates null instead of evaluating it.
|
default @Nonnull BinaryFunction<INPUT0,INPUT1,OUTPUT> |
replaceNull(OUTPUT defaultValue)
Returns a new function based on this function that returns the given default output if either input is null.
|
after, before, compose, compose, evaluate, evaluate, suppressExceptions, suppressExceptions, suppressExceptions, suppressExceptions@Pure @Nonnull default <FINAL_OUTPUT> @Nonnull BinaryFunction<INPUT0,INPUT1,FINAL_OUTPUT> before(@Nonnull @Nonnull UnaryFunction<? super OUTPUT,? extends FINAL_OUTPUT> function)
@Pure @Nonnull default <INITIAL_INPUT0,INITIAL_INPUT1> @Nonnull BinaryFunction<INITIAL_INPUT0,INITIAL_INPUT1,OUTPUT> after(@Nonnull @Nonnull UnaryFunction<? super INITIAL_INPUT0,? extends INPUT0> function0, @Nonnull @Nonnull UnaryFunction<? super INITIAL_INPUT1,? extends INPUT1> function1)
@Pure @Nonnull default @Nonnull BinaryFunction<INPUT0,INPUT1,OUTPUT> replaceNull(@Captured OUTPUT defaultValue)
FailableBinaryFunctionreplaceNull in interface FailableBinaryFunction<INPUT0,INPUT1,OUTPUT,RuntimeException>@Pure @Nonnull default @Nonnull BinaryFunction<INPUT0,INPUT1,OUTPUT> propagateNull()
FailableBinaryFunctionpropagateNull in interface FailableBinaryFunction<INPUT0,INPUT1,OUTPUT,RuntimeException>@Pure @Nonnull static <OUTPUT> @Nonnull BinaryFunction<Object,Object,OUTPUT> constant(@Captured OUTPUT output)
Copyright © 2017. All rights reserved.