Class Constants
java.lang.Object
com.terracottatech.store.function.Constants
Provides functionally transparent constant bearing functions of various arities.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T,
U, R> BiFunction<T, U, R> biFunction
(R value) Returns aBiFunction
that always returns the constantvalue
.static <T,
R> BuildableFunction<T, R> function
(R value) Returns aFunction
that always returns the constantvalue
.static <T> BuildablePredicate<T>
predicate
(boolean value) Returns aPredicate
that always returns the constantvalue
.
-
Constructor Details
-
Constants
public Constants()
-
-
Method Details
-
predicate
Returns aPredicate
that always returns the constantvalue
.- Type Parameters:
T
- predicate input type- Parameters:
value
- constant boolean value- Returns:
- a constant bearing predicate
-
function
Returns aFunction
that always returns the constantvalue
.- Type Parameters:
T
- function input typeR
- constant type- Parameters:
value
- constant value- Returns:
- a constant bearing function
-
biFunction
Returns aBiFunction
that always returns the constantvalue
.- Type Parameters:
T
- first function input typeU
- second function input typeR
- constant type- Parameters:
value
- constant value- Returns:
- a constant bearing bi-function
-