Class ComparableUtils
java.lang.Object
com.amazonaws.util.ComparableUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> intsafeCompare(Comparable<T> d1, T d2) Does a safe comparison of twoComparableobjects accounting for nulls
-
Constructor Details
-
ComparableUtils
public ComparableUtils()
-
-
Method Details
-
safeCompare
Does a safe comparison of twoComparableobjects accounting for nulls- Parameters:
d1- First objectd2- Second object- Returns:
- A positive number if the object double is larger, a negative number if the second object is larger, or 0 if they are equal. Null is considered less than any non-null value
-