|
|
@@ -10,6 +10,7 @@ import java.io.Serializable;
|
|
|
import java.util.Comparator;
|
|
|
import java.util.function.Predicate;
|
|
|
import net.ranides.assira.collection.IntComparator;
|
|
|
+import net.ranides.assira.text.LexicalCast;
|
|
|
|
|
|
|
|
|
@SuppressWarnings({
|
|
|
@@ -148,7 +149,7 @@ public final class CompareUtils {
|
|
|
@SuppressWarnings("unchecked")
|
|
|
@Override
|
|
|
public int compare(Comparable a, Comparable b) {
|
|
|
- return (a == null) ? (b == null ? 0 : -1) : (b==null ? +1 : a.compareTo(b));
|
|
|
+ return (a == null) ? (b == null ? 0 : -1) : (b==null ? +1 : a.compareTo(LexicalCast.cast(b, a.getClass())));
|
|
|
}
|
|
|
}
|
|
|
|