- java.lang.Object
-
- io.github.mmm.base.compare.NumberComparator
-
- All Implemented Interfaces:
Comparator<Number>
public class NumberComparator extends Object implements Comparator<Number>
Implementation ofComparator
forNumber
s capable to compare different types.
-
-
Field Summary
Fields Modifier and Type Field Description static NumberComparator
INSTANCE
The singleton instance.
-
Constructor Summary
Constructors Constructor Description NumberComparator()
The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(Number arg1, Number arg2)
-
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
-
-
-
-
Field Detail
-
INSTANCE
public static final NumberComparator INSTANCE
The singleton instance.
-
-
Method Detail
-
compare
public int compare(Number arg1, Number arg2)
- Specified by:
compare
in interfaceComparator<Number>
-
-