public final class QueryCollator extends Object implements Serializable
QueryCollator
class describes a collator that can be
used in dynamic profile queries in a Java serializable form.Constructor and Description |
---|
QueryCollator(Locale locale)
Create a collator identified by locale only.
|
QueryCollator(Locale locale,
int strength)
Create a collator for a given locale using the specified strength.
|
QueryCollator(Locale locale,
int strength,
int decomposition)
Create a collator for a given locale using the specified strength
and decomposition.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Compare this query collator for equality with another object.
|
Collator |
getCollator()
Get the
java.text.Collator described by this
QueryCollator object. |
int |
getDecomposition()
Get the decomposition mode specified for this collator.
|
Locale |
getLocale()
Get the locale for this collator.
|
int |
getStrength()
Get the collator strength specified for this collator.
|
boolean |
hasDecomposition()
Determine whether a decomposition mode has been defined for this collator.
|
int |
hashCode()
Get a hash code value for this query collator.
|
boolean |
hasStrength()
Determine whether a collator strength has been defined for this collator.
|
String |
toString()
Get a string representation for this query collator.
|
public QueryCollator(Locale locale)
locale
- the locale for which the collator should be obtained.NullPointerException
- if locale
is null
.public QueryCollator(Locale locale, int strength)
locale
- the locale for which the collator should be obtained.strength
- the strength of collator comparisions. This must
be one of Collator.PRIMARY
, Collator.SECONDARY
,
Collator.TERTIARY
, or Collator.IDENTICAL
.NullPointerException
- if locale
is null
.public QueryCollator(Locale locale, int strength, int decomposition)
locale
- the locale for which the collator should be obtained.strength
- the strength of collator comparisions. This must
be one of Collator.PRIMARY
, Collator.SECONDARY
,
Collator.TERTIARY
, or Collator.IDENTICAL
.decomposition
- the decomposition mode to use in the collator.
This must be one of Collator.NO_DECOMPOSITION
,
Collator.CANONICAL_DECOMPOSITION
, or
Collator.FULL_DECOMPOSITION
.NullPointerException
- if locale
is null
.public Locale getLocale()
public boolean hasStrength()
true
if a collator strength has been defined for this
collator, false
otherwise.public int getStrength()
hasStrength()
== true
.public boolean hasDecomposition()
true
if a decomposition mode has been defined for this
collator, false
otherwise.public int getDecomposition()
hasDecomposition()
== true
.public Collator getCollator()
java.text.Collator
described by this
QueryCollator
object.Collator
described by this object.public boolean equals(Object obj)
public int hashCode()