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 aComparatorthat 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 aComparatorthat 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 bythisfor equality with the supplied constant.default BuildablePredicate<T>isGreaterThan(R test) Returns a predicate that tests the value generated bythisto see if it is greater than the supplied constant.default BuildablePredicate<T>isGreaterThanOrEqualTo(R test) Returns a predicate that tests the value generated bythisto 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 bythisto see if it is less than the supplied constant.default BuildablePredicate<T>isLessThanOrEqualTo(R test) Returns a predicate that tests the value generated bythisto 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 bythisto see if it is greater than the supplied constant. Ifthisis a function that generates an emptyOptional, the returned predicate would always evaluate to false.- Specified by:
isGreaterThanin 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 bythisto see if it is less than the supplied constant. Ifthisis a function that generates an emptyOptional, the returned predicate would always evaluate to false- Specified by:
isLessThanin 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 bythisto see if it is greater than or equal to the supplied constant. Ifthisis a function that generates an emptyOptional, the returned predicate would always evaluate to false- Specified by:
isGreaterThanOrEqualToin 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 bythisto see if it is less than or equal to the supplied constant. Ifthisis a function that generates an emptyOptional, the returned predicate would always evaluate to false- Specified by:
isLessThanOrEqualToin interfaceComparableFunction<T,R extends Comparable<R>> - Parameters:
test- value to test against- Returns:
- a less than or equal to predicate
-
emptiesFirst
Returns aComparatorthat 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 aComparatorthat 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:BuildableOptionalFunctionReturns a predicate that tests the value generated bythisfor equality with the supplied constant. Ifthisis 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:
isin interfaceBuildableOptionalFunction<T,R extends Comparable<R>> - Specified by:
isin interfaceComparableFunction<T,R extends Comparable<R>> - Parameters:
test- value to test against- Returns:
- an equality predicate
-