Interface BuildableFunction<T,R>
- All Superinterfaces:
Function<T,
R>
- All Known Subinterfaces:
BuildableBytesFunction<T>
,BuildableComparableFunction<T,
,R> BuildableComparableSelectionFunction<SRC,
,T, P> BuildableComplexDataFunction<T,
,C> BuildableListFunction<T>
,BuildableMapFunction<T>
,BuildableNumberSelectionFunction<SRC,
,T, P> BuildableSelectionFunction<SRC,
,T, P> BuildableStringFunction<T>
,BuildableTypedValueSelectionFunction<SRC>
A function of one argument that supports building derived functional types.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Function<T,
T> identity()
Returns a function that simply returns its argument.default BuildablePredicate<T>
Returns a predicate that tests the value generated bythis
is contained within the supplied set.default BuildablePredicate<T>
Returns a predicate that tests the value generated bythis
is contained within the supplied collection.default BuildablePredicate<T>
Returns a predicate that tests the value generated bythis
for equality with the supplied constant.
-
Method Details
-
is
Returns a predicate that tests the value generated bythis
for equality with the supplied constant.Equality is defined by the behavior of the
Objects.deepEquals(java.lang.Object, java.lang.Object)
method.- Parameters:
test
- value to test against- Returns:
- an equality predicate
-
in
Returns a predicate that tests the value generated bythis
is contained within the supplied set.- Parameters:
values
- to test against- Returns:
- a "contained in" predicate
-
in
Returns a predicate that tests the value generated bythis
is contained within the supplied collection.- Parameters:
collection
- to test against- Returns:
- a "contained in" predicate
-
identity
Returns a function that simply returns its argument.- Type Parameters:
T
- the type of the input and resul- Returns:
- a function returning its argument
-