com.sun.jersey.core.util
Class StringIgnoreCaseKeyComparator
java.lang.Object
com.sun.jersey.core.util.StringIgnoreCaseKeyComparator
- All Implemented Interfaces:
- KeyComparator<java.lang.String>, java.util.Comparator<java.lang.String>
public class StringIgnoreCaseKeyComparator
- extends java.lang.Object
- implements KeyComparator<java.lang.String>
Case insensitive String key comparator.
- Author:
- [email protected]
Method Summary |
int |
compare(java.lang.String o1,
java.lang.String o2)
|
boolean |
equals(java.lang.String x,
java.lang.String y)
Compare two keys for equality. |
int |
hash(java.lang.String k)
Get the hash code of a key. |
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 |
SINGLETON
public static final StringIgnoreCaseKeyComparator SINGLETON
StringIgnoreCaseKeyComparator
public StringIgnoreCaseKeyComparator()
hash
public int hash(java.lang.String k)
- Description copied from interface:
KeyComparator
- Get the hash code of a key.
- Specified by:
hash
in interface KeyComparator<java.lang.String>
- Parameters:
k
- the key.
- Returns:
- the hash code of the key.
equals
public boolean equals(java.lang.String x,
java.lang.String y)
- Description copied from interface:
KeyComparator
- Compare two keys for equality.
- Specified by:
equals
in interface KeyComparator<java.lang.String>
- Parameters:
x
- the first keyy
- the second key
- Returns:
- true if the keys are equal.
compare
public int compare(java.lang.String o1,
java.lang.String o2)
- Specified by:
compare
in interface java.util.Comparator<java.lang.String>
Copyright © 2010 Oracle Corporation. All Rights Reserved.