@Immutable @Functional public interface FailableUnaryOperator<TYPE,EXCEPTION extends Exception> extends FailableUnaryFunction<TYPE,TYPE,EXCEPTION>
TYPE to another object of type TYPE.| Modifier and Type | Method and Description |
|---|---|
default @Nonnull FailableUnaryOperator<TYPE,EXCEPTION> |
after(@Nonnull FailableUnaryOperator<TYPE,? extends EXCEPTION> operator)
Returns the composition of the given operator followed by this operator.
|
default @Nonnull FailableUnaryOperator<TYPE,EXCEPTION> |
before(@Nonnull FailableUnaryOperator<TYPE,? extends EXCEPTION> operator)
Returns the composition of this operator followed by the given operator.
|
static <TYPE,EXCEPTION extends Exception> |
compose(@Nonnull FailableUnaryOperator<TYPE,? extends EXCEPTION> operator0,
@Nonnull FailableUnaryOperator<TYPE,? extends EXCEPTION> operator1)
Returns the composition of the given operators with a flexible exception type.
|
default @Nonnull FailableUnaryOperator<TYPE,EXCEPTION> |
propagateNull()
Returns a new function based on this function that propagates null instead of evaluating it.
|
default @Nonnull FailableUnaryOperator<TYPE,EXCEPTION> |
replaceNull(TYPE defaultOutput)
Returns a new function based on this function that returns the given default output for null.
|
default @Nonnull UnaryOperator<TYPE> |
suppressExceptions()
Returns a function that suppresses the exceptions of this function and returns null instead.
|
default @Nonnull UnaryOperator<TYPE> |
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 UnaryOperator<TYPE> |
suppressExceptions(@Nonnull Consumer<? super Exception> handler,
TYPE 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 UnaryOperator<TYPE> |
suppressExceptions(TYPE defaultOutput)
Returns a function that suppresses the exceptions of this function and returns the given default output instead.
|
after, before, compose, evaluate@Pure @Nonnull default @Nonnull UnaryOperator<TYPE> suppressExceptions(@Captured @Nonnull @Nonnull Consumer<? super Exception> handler, @Captured TYPE defaultOutput)
FailableUnaryFunctionsuppressExceptions in interface FailableUnaryFunction<TYPE,TYPE,EXCEPTION extends Exception>@Pure @Nonnull default @Nonnull UnaryOperator<TYPE> suppressExceptions(@Captured @Nonnull @Nonnull Consumer<? super Exception> handler)
FailableUnaryFunctionsuppressExceptions in interface FailableUnaryFunction<TYPE,TYPE,EXCEPTION extends Exception>@Pure @Nonnull default @Nonnull UnaryOperator<TYPE> suppressExceptions(@Captured TYPE defaultOutput)
FailableUnaryFunctionsuppressExceptions in interface FailableUnaryFunction<TYPE,TYPE,EXCEPTION extends Exception>@Pure @Nonnull default @Nonnull UnaryOperator<TYPE> suppressExceptions()
FailableUnaryFunctionsuppressExceptions in interface FailableUnaryFunction<TYPE,TYPE,EXCEPTION extends Exception>@Pure @Nonnull static <TYPE,EXCEPTION extends Exception> @Nonnull FailableUnaryOperator<TYPE,EXCEPTION> compose(@Nonnull @Nonnull FailableUnaryOperator<TYPE,? extends EXCEPTION> operator0, @Nonnull @Nonnull FailableUnaryOperator<TYPE,? extends EXCEPTION> operator1)
@Pure @Nonnull default @Nonnull FailableUnaryOperator<TYPE,EXCEPTION> before(@Nonnull @Nonnull FailableUnaryOperator<TYPE,? extends EXCEPTION> operator)
@Pure @Nonnull default @Nonnull FailableUnaryOperator<TYPE,EXCEPTION> after(@Nonnull @Nonnull FailableUnaryOperator<TYPE,? extends EXCEPTION> operator)
@Pure @Nonnull default @Nonnull FailableUnaryOperator<TYPE,EXCEPTION> replaceNull(@Captured TYPE defaultOutput)
FailableUnaryFunctionreplaceNull in interface FailableUnaryFunction<TYPE,TYPE,EXCEPTION extends Exception>@Pure @Nonnull default @Nonnull FailableUnaryOperator<TYPE,EXCEPTION> propagateNull()
FailableUnaryFunctionpropagateNull in interface FailableUnaryFunction<TYPE,TYPE,EXCEPTION extends Exception>Copyright © 2017. All rights reserved.