org.statcato.spreadsheet
Class CellComparator

java.lang.Object
  extended by org.statcato.spreadsheet.CellComparator
All Implemented Interfaces:
java.util.Comparator

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

A comparator for Cell objects (ascending order). If the Cell objects contains numbers, compare them as numbers. If the Cell objects do not contain numbers, compare them as strings (empty strings are largest).

Since:
1.0
Version:
%I%, %G%
Author:
Margaret Yau
See Also:
Cell

Constructor Summary
CellComparator()
           
 
Method Summary
 int compare(java.lang.Object Cell1, java.lang.Object Cell2)
           
 
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

CellComparator

public CellComparator()
Method Detail

compare

public int compare(java.lang.Object Cell1,
                   java.lang.Object Cell2)
Specified by:
compare in interface java.util.Comparator