prog.utils
Class IgnoreCaseSorter

java.lang.Object
  |
  +--prog.utils.IgnoreCaseSorter
All Implemented Interfaces:
java.util.Comparator

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

This Comparator for Strings ignores case. So, instead of the default sorting of Strings that would yield this:

ABC
BCD
apple
baby
the Comparator yields this:
ABC
apple
baby
BCD


Constructor Summary
IgnoreCaseSorter()
           
 
Method Summary
 int compare(java.lang.Object ob1, java.lang.Object ob2)
           
 
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

IgnoreCaseSorter

public IgnoreCaseSorter()
Method Detail

compare

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