R - the type of the result of the function@FunctionalInterface public interface Function0<R> extends FunctionN<R>, Variant<java.util.function.Supplier<R>>
FunctionN.
This is a functional interface whose functional method is apply().
FunctionNFunctionN.FunctionSizeException, FunctionN.Instance<R>| Modifier and Type | Method and Description |
|---|---|
default <V> Function0<V> |
andThen(Function1<? super R,? extends V> after)
Returns a chained object that applies this chainable object, and then
applies the
after function to ths result. |
default <V> Function0<V> |
andThenUnchecked(Function1<? super R,? extends V> after)
Returns a chained object that applies this chainable object, and then
applies the
after function to ths result. |
R |
apply()
Applies this function.
|
default R |
applyAllUnchecked(java.lang.Object... args)
Applies this function to the given arguments.
|
default int |
arity()
Returns the number of arguments of the function.
|
static <R> Function0<R> |
fromVariant(java.util.function.Supplier<? extends R> supplier)
Creates an instance of this object from its
Supplier variant. |
default java.util.function.Supplier<R> |
toVariant()
Returns the variant of this object.
|
checkSize, checkSize, sizedApplyAllUncheckedR apply()
default R applyAllUnchecked(java.lang.Object... args)
FunctionNapplyAllUnchecked in interface FunctionN<R>args - the function argumentsdefault int arity()
FunctionN-1.static <R> Function0<R> fromVariant(java.util.function.Supplier<? extends R> supplier)
Supplier variant.R - the type of the result of the functionsupplier - the variant of this objectSupplierdefault java.util.function.Supplier<R> toVariant()
Variantdefault <V> Function0<V> andThen(Function1<? super R,? extends V> after)
ResultChainableafter function to ths result. If evaluation of either
throws an exception, it is relayed to the caller of the chained object.andThen in interface FunctionN<R>andThen in interface ResultChainable<R>andThen in interface ResultChainableResult<R>V - the type of the output of the after function, and of
the chained objectafter - the function to apply after this chainable object is appliedafter functiondefault <V> Function0<V> andThenUnchecked(Function1<? super R,? extends V> after)
ResultChainableafter function to ths result. If evaluation of either
throws an exception, it is relayed to the caller of the chained object.
This makes no assumptions on the arguments of this method.andThenUnchecked in interface FunctionN<R>andThenUnchecked in interface ResultChainable<R>andThenUnchecked in interface ResultChainableResult<R>V - the type of the output of the after function, and of
the chained objectafter - the function to apply after this chainable object is appliedafter function