Class Functions
java.lang.Object
org.wildfly.clustering.cache.function.Functions
Reusable function implementations.
- Author:
- Paul Ferraro
-
Method Summary
Modifier and TypeMethodDescriptionstatic <R> DoubleFunction<R> constantDoubleFunction(R result) Returns a function that always returns a constant result, regardless of input.static <T,R> Function <T, R> constantFunction(R result) Returns a function that always returns a constant result, regardless of input.static <R> IntFunction<R> constantIntFunction(R result) Returns a function that always returns a constant result, regardless of input.static <R> LongFunction<R> constantLongFunction(R result) Returns a function that always returns a constant result, regardless of input.static <T,R> Function <T, R> Returns a function that always returns a constant result, regardless of input.
-
Method Details
-
nullFunction
Returns a function that always returns a constant result, regardless of input.- Type Parameters:
T- the function parameter typeR- the function return type- Returns:
- a function that always returns the specified result
-
constantFunction
Returns a function that always returns a constant result, regardless of input.- Type Parameters:
T- the function parameter typeR- the function return type- Returns:
- a function that always returns the specified result
-
constantIntFunction
Returns a function that always returns a constant result, regardless of input.- Type Parameters:
R- the function return type- Returns:
- a function that always returns the specified result
-
constantLongFunction
Returns a function that always returns a constant result, regardless of input.- Type Parameters:
R- the function return type- Returns:
- a function that always returns the specified result
-
constantDoubleFunction
Returns a function that always returns a constant result, regardless of input.- Type Parameters:
R- the function return type- Returns:
- a function that always returns the specified result
-