@Immutable @Functional public interface UnaryOperator<TYPE> extends UnaryFunction<TYPE,TYPE>, FailableUnaryOperator<TYPE,RuntimeException>
TYPE to another object of type TYPE.| Modifier and Type | Method and Description |
|---|---|
default @Nonnull UnaryOperator<TYPE> |
after(@Nonnull UnaryOperator<TYPE> operator)
Returns the composition of the given operator followed by this operator.
|
default @Nonnull UnaryOperator<TYPE> |
before(@Nonnull UnaryOperator<TYPE> operator)
Returns the composition of this operator followed by the given operator.
|
static <TYPE> @Nonnull UnaryOperator<TYPE> |
constant(TYPE output)
Returns an operator that always returns the given output.
|
static <TYPE> @Nonnull UnaryOperator<TYPE> |
identity()
Returns a unary operator that always returns its input argument.
|
default @Nonnull UnaryOperator<TYPE> |
propagateNull()
Returns a new function based on this function that propagates null instead of evaluating it.
|
default @Nonnull UnaryOperator<TYPE> |
replaceNull(TYPE defaultOutput)
Returns a new function based on this function that returns the given default output for null.
|
static <TYPE> @Nonnull UnaryOperator<TYPE> |
with(@Nonnull Map<? super TYPE,? extends TYPE> map)
Returns an operator that looks up the result in the given map or returns null if the input is not found in the map.
|
static <TYPE> @Nonnull UnaryOperator<TYPE> |
with(@Nonnull Map<? super TYPE,? extends TYPE> map,
TYPE defaultValue)
Returns an operator that looks up the result in the given map or returns the given default value if the input is not found in the map.
|
after, beforeafter, before, compose, suppressExceptions, suppressExceptions, suppressExceptions, suppressExceptionsafter, before, compose, evaluate@Pure @Nonnull default @Nonnull UnaryOperator<TYPE> before(@Nonnull @Nonnull UnaryOperator<TYPE> operator)
@Pure @Nonnull default @Nonnull UnaryOperator<TYPE> after(@Nonnull @Nonnull UnaryOperator<TYPE> operator)
@Pure @Nonnull default @Nonnull UnaryOperator<TYPE> replaceNull(@Captured TYPE defaultOutput)
FailableUnaryFunctionreplaceNull in interface FailableUnaryFunction<TYPE,TYPE,RuntimeException>replaceNull in interface FailableUnaryOperator<TYPE,RuntimeException>replaceNull in interface UnaryFunction<TYPE,TYPE>@Pure @Nonnull default @Nonnull UnaryOperator<TYPE> propagateNull()
FailableUnaryFunctionpropagateNull in interface FailableUnaryFunction<TYPE,TYPE,RuntimeException>propagateNull in interface FailableUnaryOperator<TYPE,RuntimeException>propagateNull in interface UnaryFunction<TYPE,TYPE>@Pure @Nonnull static <TYPE> @Nonnull UnaryOperator<TYPE> with(@Nonnull @Nonnull Map<? super TYPE,? extends TYPE> map, TYPE defaultValue)
with in interface UnaryFunction<TYPE,TYPE>@Pure @Nonnull static <TYPE> @Nonnull UnaryOperator<TYPE> with(@Nonnull @Nonnull Map<? super TYPE,? extends TYPE> map)
with in interface UnaryFunction<TYPE,TYPE>@Pure @Nonnull static <TYPE> @Nonnull UnaryOperator<TYPE> constant(@Captured TYPE output)
constant in interface UnaryFunction<TYPE,TYPE>@Pure @Nonnull static <TYPE> @Nonnull UnaryOperator<TYPE> identity()
Copyright © 2017. All rights reserved.