Interface BuildableComparableOptionalFunction<T,R extends Comparable<R>>
- All Superinterfaces:
BuildableOptionalFunction<T,
,R> ComparableFunction<T,
,R> Function<T,
Optional<R>>
- All Known Subinterfaces:
BuildableStringOptionalFunction<T>
public interface BuildableComparableOptionalFunction<T,R extends Comparable<R>>
extends BuildableOptionalFunction<T,R>, ComparableFunction<T,R>
A function of one argument that generates an
Optional<Comparable>
result, and
supports building derived functional types.-
Method Summary
Modifier and TypeMethodDescriptiondefault <U extends T>
Comparator<U>Returns aComparator
that orders objects using the optional values mapped by this function, with empty values considered less than non-empty.default <U extends T>
Comparator<U>Returns aComparator
that orders objects using the optional values mapped by this function, with empty values considered greater than non-empty.default BuildablePredicate<T>
Returns a predicate that tests the value generated bythis
for equality with the supplied constant.default BuildablePredicate<T>
isGreaterThan
(R test) Returns a predicate that tests the value generated bythis
to see if it is greater than the supplied constant.default BuildablePredicate<T>
isGreaterThanOrEqualTo
(R test) Returns a predicate that tests the value generated bythis
to see if it is greater than or equal to the supplied constant.default BuildablePredicate<T>
isLessThan
(R test) Returns a predicate that tests the value generated bythis
to see if it is less than the supplied constant.default BuildablePredicate<T>
isLessThanOrEqualTo
(R test) Returns a predicate that tests the value generated bythis
to see if it is less than or equal to the supplied constant.Methods inherited from interface com.terracottatech.store.function.BuildableOptionalFunction
in, in
-
Method Details
-
isGreaterThan
Returns a predicate that tests the value generated bythis
to see if it is greater than the supplied constant. Ifthis
is a function that generates an emptyOptional
, the returned predicate would always evaluate to false.- Specified by:
isGreaterThan
in interfaceComparableFunction<T,
R extends Comparable<R>> - Parameters:
test
- value to test against- Returns:
- a greater than predicate
-
isLessThan
Returns a predicate that tests the value generated bythis
to see if it is less than the supplied constant. Ifthis
is a function that generates an emptyOptional
, the returned predicate would always evaluate to false- Specified by:
isLessThan
in interfaceComparableFunction<T,
R extends Comparable<R>> - Parameters:
test
- value to test against- Returns:
- a less than predicate
-
isGreaterThanOrEqualTo
Returns a predicate that tests the value generated bythis
to see if it is greater than or equal to the supplied constant. Ifthis
is a function that generates an emptyOptional
, the returned predicate would always evaluate to false- Specified by:
isGreaterThanOrEqualTo
in interfaceComparableFunction<T,
R extends Comparable<R>> - Parameters:
test
- value to test against- Returns:
- a greater than or equal to predicate
-
isLessThanOrEqualTo
Returns a predicate that tests the value generated bythis
to see if it is less than or equal to the supplied constant. Ifthis
is a function that generates an emptyOptional
, the returned predicate would always evaluate to false- Specified by:
isLessThanOrEqualTo
in interfaceComparableFunction<T,
R extends Comparable<R>> - Parameters:
test
- value to test against- Returns:
- a less than or equal to predicate
-
emptiesFirst
Returns aComparator
that orders objects using the optional values mapped by this function, with empty values considered less than non-empty.- Returns:
- a comparator that orders using the mapped optional values
-
emptiesLast
Returns aComparator
that orders objects using the optional values mapped by this function, with empty values considered greater than non-empty.- Returns:
- a comparator that orders using the mapped optional values
-
is
Description copied from interface:BuildableOptionalFunction
Returns a predicate that tests the value generated bythis
for equality with the supplied constant. Ifthis
is a function that generates an emptyOptional
, the returned predicate would always evaluate to falseEquality is defined by the behavior of the
Objects.deepEquals(java.lang.Object, java.lang.Object)
method.- Specified by:
is
in interfaceBuildableOptionalFunction<T,
R extends Comparable<R>> - Specified by:
is
in interfaceComparableFunction<T,
R extends Comparable<R>> - Parameters:
test
- value to test against- Returns:
- an equality predicate
-