ex1
Class ParamCompare

java.lang.Object
  extended byex1.ParamCompare
All Implemented Interfaces:
java.util.Comparator

public class ParamCompare
extends java.lang.Object
implements java.util.Comparator

This class implements the comparator used in sorting columns. It is sensitive to float strings and will convert the strings to float values to do the compare if necessary.


Constructor Summary
ParamCompare()
          Creates a new instance of ParamCompare
 
Method Summary
 int compare(java.lang.Object o1, java.lang.Object o2)
          Called automatically by a class using the comprator.
 
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
 

Constructor Detail

ParamCompare

public ParamCompare()
Creates a new instance of ParamCompare

Method Detail

compare

public int compare(java.lang.Object o1,
                   java.lang.Object o2)
Called automatically by a class using the comprator. Converts strings to floats if necassary.

Specified by:
compare in interface java.util.Comparator
Parameters:
o1 - First Object(string) to compare
o2 - Second Object(string) to compare first against
Returns:
0 if strings are equal, 1 if string 1 > string 2, -1 if string 1 < string 2