com.sun.jersey.core.util
Class StringIgnoreCaseKeyComparator
java.lang.Object
com.sun.jersey.core.util.StringIgnoreCaseKeyComparator
- All Implemented Interfaces:
- KeyComparator<String>, Comparator<String>
public class StringIgnoreCaseKeyComparator
- extends Object
- implements KeyComparator<String>
Case insensitive String key comparator.
- Author:
- Paul.Sandoz@Sun.Com
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SINGLETON
public static final StringIgnoreCaseKeyComparator SINGLETON
StringIgnoreCaseKeyComparator
public StringIgnoreCaseKeyComparator()
hash
public int hash(String k)
- Description copied from interface:
KeyComparator
- Get the hash code of a key.
- Specified by:
hash
in interface KeyComparator<String>
- Parameters:
k
- the key.
- Returns:
- the hash code of the key.
equals
public boolean equals(String x,
String y)
- Description copied from interface:
KeyComparator
- Compare two keys for equality.
- Specified by:
equals
in interface KeyComparator<String>
- Parameters:
x
- the first keyy
- the second key
- Returns:
- true if the keys are equal.
compare
public int compare(String o1,
String o2)
- Specified by:
compare
in interface Comparator<String>
Copyright © 2011 Oracle Corporation. All Rights Reserved.