Package org.apache.cassandra.utils
Class Comparables
java.lang.Object
org.apache.cassandra.utils.Comparables
Utility methods linked to comparing comparable values.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Comparable<? super T>>
Tmax(T a, T b) Returns the maximum of 2 comparable values.static <C,T extends C>
Tmax(T a, T b, Comparator<C> comparator) Returns the maximum of 2 values given a comparator of those values.static <T extends Comparable<? super T>>
Tmin(T a, T b) Returns the minimum of 2 comparable values.static <C,T extends C>
Tmin(T a, T b, Comparator<C> comparator) Returns the minimum of 2 values given a comparator of those values.
-
Constructor Details
-
Comparables
public Comparables()
-
-
Method Details
-
max
Returns the maximum of 2 comparable values. On ties, returns the first argument. -
max
Returns the maximum of 2 values given a comparator of those values. On ties, returns the first argument. -
min
Returns the minimum of 2 comparable values. On ties, returns the first argument. -
min
Returns the minimum of 2 values given a comparator of those values. On ties, returns the first argument.
-