Class DimensionComparisonUtils


  • public class DimensionComparisonUtils
    extends Object
    Utility class to compare dimensions
    • Constructor Detail

      • DimensionComparisonUtils

        public DimensionComparisonUtils()
    • Method Detail

      • isNaturalComparator

        public static boolean isNaturalComparator​(ValueType type,
                                                  StringComparator comparator)
        Checks if the comparator is the natural comparator for the given type. Natural comparator for a type is the comparator that will yield the same results as a.compareTo(b) for objects a, b belonging to that valueType. In such cases, it'll be faster to directly use the comparison methods provided by Java or the library, as using the StringComparator would be slow. MSQ only supports natural comparators