|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.text.Collator
com.tangosol.util.CacheCollator
public class CacheCollator
Implements a collator which caches its keys.
Field Summary |
---|
Fields inherited from class java.text.Collator |
---|
CANONICAL_DECOMPOSITION, FULL_DECOMPOSITION, IDENTICAL, NO_DECOMPOSITION, PRIMARY, SECONDARY, TERTIARY |
Constructor Summary | |
---|---|
CacheCollator(Collator collator)
Construct this collator to cache the results of another collator. |
Method Summary | |
---|---|
Object |
clone()
Clone the caching collator. |
int |
compare(String source,
String target)
Compares the source string to the target string according to the collation rules for this Collator. |
boolean |
equals(Object that)
Compares the equality of two Collators. |
protected Map |
getCache()
|
CollationKey |
getCollationKey(String source)
Transforms the String into a series of bits that can be compared bitwise to other CollationKeys. |
int |
getDecomposition()
Get the decomposition mode of this Collator. |
int |
getStrength()
Returns this Collator's strength property. |
int |
hashCode()
Generates the hash code for this Collator. |
void |
setDecomposition(int decomposition)
Set the decomposition mode of this Collator. |
void |
setStrength(int newStrength)
Sets this Collator's strength property. |
Methods inherited from class java.text.Collator |
---|
compare, equals, getAvailableLocales, getInstance, getInstance |
Constructor Detail |
---|
public CacheCollator(Collator collator)
collator
- the collator to delegate toMethod Detail |
---|
public int getStrength()
getStrength
in class Collator
public void setStrength(int newStrength)
setStrength
in class Collator
newStrength
- the new strength value.
UnsupportedOperationException
- always thrownpublic int getDecomposition()
getDecomposition
in class Collator
public void setDecomposition(int decomposition)
setDecomposition
in class Collator
decomposition
- the new decomposition mode
UnsupportedOperationException
- always thrownpublic int compare(String source, String target)
For a one time comparison, this method has the best performance. If a given String will be involved in multiple comparisons, CollationKey.compareTo has the best performance. See the Collator class description for an example using CollationKeys.
compare
in class Collator
source
- the source string.target
- the target string.
public CollationKey getCollationKey(String source)
getCollationKey
in class Collator
source
- the string to be transformed into a collation key.
public Object clone()
clone
in class Collator
public boolean equals(Object that)
equals
in interface Comparator
equals
in class Collator
that
- the Collator to be compared with this.
public int hashCode()
hashCode
in class Collator
protected Map getCache()
|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |