@Immutable @Functional public interface BinaryOperator<TYPE> extends BinaryFunction<TYPE,TYPE,TYPE>, FailableBinaryOperator<TYPE,RuntimeException>
TYPE to another object of type TYPE.| Modifier and Type | Method and Description |
|---|---|
default @Nonnull BinaryOperator<TYPE> |
after(@Nonnull UnaryOperator<TYPE> operator0,
@Nonnull UnaryOperator<TYPE> operator1)
Returns the composition of the given operators followed by this operator.
|
default @Nonnull BinaryOperator<TYPE> |
before(@Nonnull UnaryOperator<TYPE> operator)
Returns the composition of this operator followed by the given operator.
|
static <TYPE> @Nonnull BinaryOperator<TYPE> |
constant(TYPE output)
Returns a binary function that always returns the given output.
|
static <TYPE> @Nonnull BinaryOperator<TYPE> |
max(@Nonnull Comparator<? super TYPE> comparator)
Returns a binary operator which returns the greater of two objects according to the given comparator.
|
static <TYPE> @Nonnull BinaryOperator<TYPE> |
min(@Nonnull Comparator<? super TYPE> comparator)
Returns a binary operator which returns the lesser of two objects according to the given comparator.
|
default @Nonnull BinaryOperator<TYPE> |
propagateNull()
Returns a new function based on this function that propagates null instead of evaluating it.
|
default @Nonnull BinaryOperator<TYPE> |
replaceNull(TYPE defaultValue)
Returns a new function based on this function that returns the given default output if either input is null.
|
after, beforeafter, before, compose, compose, suppressExceptions, suppressExceptions, suppressExceptions, suppressExceptions@Pure @Nonnull default @Nonnull BinaryOperator<TYPE> before(@Nonnull @Nonnull UnaryOperator<TYPE> operator)
@Pure @Nonnull default @Nonnull BinaryOperator<TYPE> after(@Nonnull @Nonnull UnaryOperator<TYPE> operator0, @Nonnull @Nonnull UnaryOperator<TYPE> operator1)
@Pure @Nonnull default @Nonnull BinaryOperator<TYPE> replaceNull(@Captured TYPE defaultValue)
FailableBinaryFunctionreplaceNull in interface BinaryFunction<TYPE,TYPE,TYPE>replaceNull in interface FailableBinaryFunction<TYPE,TYPE,TYPE,RuntimeException>replaceNull in interface FailableBinaryOperator<TYPE,RuntimeException>@Pure @Nonnull default @Nonnull BinaryOperator<TYPE> propagateNull()
FailableBinaryFunctionpropagateNull in interface BinaryFunction<TYPE,TYPE,TYPE>propagateNull in interface FailableBinaryFunction<TYPE,TYPE,TYPE,RuntimeException>propagateNull in interface FailableBinaryOperator<TYPE,RuntimeException>@Pure @Nonnull static <TYPE> @Nonnull BinaryOperator<TYPE> constant(@Captured TYPE output)
constant in interface BinaryFunction<TYPE,TYPE,TYPE>@Pure @Nonnull static <TYPE> @Nonnull BinaryOperator<TYPE> min(@Nonnull @Nonnull Comparator<? super TYPE> comparator)
@Pure @Nonnull static <TYPE> @Nonnull BinaryOperator<TYPE> max(@Nonnull @Nonnull Comparator<? super TYPE> comparator)
Copyright © 2017. All rights reserved.