com.bigzip.plugin.support.table
Class NumberSorter

java.lang.Object
  |
  +--com.bigzip.plugin.support.table.NumberSorter
All Implemented Interfaces:
DataSorter

public class NumberSorter
extends java.lang.Object
implements DataSorter


Constructor Summary
NumberSorter()
           
 
Method Summary
 int compare(java.lang.Object a, java.lang.Object b)
          Sorts two long-sized numbers in numeric order.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NumberSorter

public NumberSorter()
Method Detail

compare

public int compare(java.lang.Object a,
                   java.lang.Object b)
            throws java.lang.IllegalArgumentException
Sorts two long-sized numbers in numeric order.
Specified by:
compare in interface DataSorter
Parameters:
a - The first Number object.
b - The second Number object.
Returns:
-1 if a is less than b, 1 if a is greater than b, 0 otherwise.
Throws:
java.lang.IllegalArgumentException - one or both parameters are not Number objects.