Package tech.uom.lib.common.util
Class NumberComparator
- java.lang.Object
-
- tech.uom.lib.common.util.NumberComparator
-
- All Implemented Interfaces:
Comparator<Number>
public class NumberComparator extends Object implements Comparator<Number>
Compares two Number objects with each other- Since:
- 1.0.2
- Version:
- 0.2
- Author:
- Werner
-
-
Method Summary
Modifier and Type Method Description protected static charcharAt(String s, int i)intcompare(Number o1, Number o2)protected intcompareRight(String a, String b)static NumberComparatorgetInstance()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Method Detail
-
compareRight
protected int compareRight(String a, String b)
-
compare
public int compare(Number o1, Number o2)
- Specified by:
comparein interfaceComparator<Number>
-
getInstance
public static NumberComparator getInstance()
-
-