Package tech.harmonysoft.oss.common.data
Interface ComparisonStrategy
-
- All Implemented Interfaces:
public interface ComparisonStrategy
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classComparisonStrategy.Companion
-
Method Summary
-
-
Method Detail
-
compare
abstract <T extends Any> Integer compare(KClass<T> targetType, T first, T second)
Like Comparator but night return
nullas an indication that comparison can't be performed, e.g. when we try to comparenulland not-null.Note: exact logic is specific for the type and business use-case, for example, sometimes we might want
compare(null, "")to return0
-
-
-
-