Class DefaultComparisonStrategy

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      <T extends Any> Integer compare(KClass<T> targetType, T first, T second) Like Comparator but night return null as an indication that comparison can't be performed, e.g.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • compare

         <T extends Any> Integer compare(KClass<T> targetType, T first, T second)

        Like Comparator but night return null as an indication that comparison can't be performed, e.g. when we try to compare null and not-null.

        Note: exact logic is specific for the type and business use-case, for example, sometimes we might want compare(null, "") to return 0