Buju 0.4

biz.bbeans.util
Class BIgnoreCaseComparator

java.lang.Object
  extended bybiz.bbeans.util.BIgnoreCaseComparator
All Implemented Interfaces:
Comparator

public class BIgnoreCaseComparator
extends Object
implements Comparator

Comparator which ignores case in comparing Strings.


Constructor Summary
BIgnoreCaseComparator()
          Create a new BIgnoreCaseComparator.
 
Method Summary
 int compare(Object str1, Object str2)
          Compare String 1 to String 3, ignoring case.
 
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

BIgnoreCaseComparator

public BIgnoreCaseComparator()
Create a new BIgnoreCaseComparator.

Method Detail

compare

public int compare(Object str1,
                   Object str2)
Compare String 1 to String 3, ignoring case.

Specified by:
compare in interface Comparator
Parameters:
str1 - String 1. Must be a String.
str2 - String 2. Must be a String.
Returns:
((String)str1).compareToIgnoreCase((String)str2)

Buju 0.4