biz.bbeans.util
Class BIgnoreCaseComparator
java.lang.Object
biz.bbeans.util.BIgnoreCaseComparator
- All Implemented Interfaces:
- Comparator
- public class BIgnoreCaseComparator
- extends Object
- implements Comparator
Comparator which ignores case in comparing Strings.
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 |
BIgnoreCaseComparator
public BIgnoreCaseComparator()
- Create a new BIgnoreCaseComparator.
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)