| Modifier and Type | Field and Description |
|---|---|
static int |
ALTERNATE_HANDLING |
static int |
CASE_FIRST |
static int |
CASE_LEVEL |
static int |
DECOMPOSITION_MODE |
static int |
FRENCH_COLLATION |
static int |
STRENGTH |
static int |
VALUE_ATTRIBUTE_VALUE_COUNT |
static int |
VALUE_DEFAULT |
static int |
VALUE_DEFAULT_STRENGTH |
static int |
VALUE_IDENTICAL |
static int |
VALUE_LOWER_FIRST |
static int |
VALUE_NON_IGNORABLE |
static int |
VALUE_OFF |
static int |
VALUE_ON |
static int |
VALUE_ON_WITHOUT_HANGUL |
static int |
VALUE_PRIMARY |
static int |
VALUE_QUATERNARY |
static int |
VALUE_SECONDARY |
static int |
VALUE_SHIFTED |
static int |
VALUE_TERTIARY |
static int |
VALUE_UPPER_FIRST |
| Constructor and Description |
|---|
RuleBasedCollatorICU(Locale locale) |
RuleBasedCollatorICU(String rules) |
| Modifier and Type | Method and Description |
|---|---|
Object |
clone()
Creates and returns a copy of this
Object. |
int |
compare(String source,
String target) |
boolean |
equals(Object object)
Compares this instance with the specified object and indicates if they
are equal.
|
boolean |
equals(String source,
String target) |
protected void |
finalize()
Invoked when the garbage collector has detected that this instance is no longer reachable.
|
int |
getAttribute(int type) |
CollationElementIteratorICU |
getCollationElementIterator(CharacterIterator it) |
CollationElementIteratorICU |
getCollationElementIterator(String source) |
CollationKey |
getCollationKey(String source) |
int |
getDecomposition() |
String |
getRules() |
int |
getStrength() |
int |
hashCode()
Returns an integer hash code for this object.
|
void |
setAttribute(int type,
int value) |
void |
setDecomposition(int mode) |
void |
setStrength(int strength) |
public static final int VALUE_DEFAULT
public static final int VALUE_PRIMARY
public static final int VALUE_SECONDARY
public static final int VALUE_TERTIARY
public static final int VALUE_DEFAULT_STRENGTH
public static final int VALUE_QUATERNARY
public static final int VALUE_IDENTICAL
public static final int VALUE_OFF
public static final int VALUE_ON
public static final int VALUE_SHIFTED
public static final int VALUE_NON_IGNORABLE
public static final int VALUE_LOWER_FIRST
public static final int VALUE_UPPER_FIRST
public static final int VALUE_ON_WITHOUT_HANGUL
public static final int VALUE_ATTRIBUTE_VALUE_COUNT
public static final int FRENCH_COLLATION
public static final int ALTERNATE_HANDLING
public static final int CASE_FIRST
public static final int CASE_LEVEL
public static final int DECOMPOSITION_MODE
public static final int STRENGTH
public RuleBasedCollatorICU(String rules) throws ParseException
ParseExceptionpublic RuleBasedCollatorICU(Locale locale)
public Object clone()
ObjectObject. The default
implementation returns a so-called "shallow" copy: It creates a new
instance of the same class and then copies the field values (including
object references) from this instance to the new instance. A "deep" copy,
in contrast, would also recursively clone nested objects. A subclass that
needs to implement this kind of cloning should call super.clone()
to create the new instance and then create deep copies of the nested,
mutable objects.public int getDecomposition()
public void setDecomposition(int mode)
public int getStrength()
public void setStrength(int strength)
public void setAttribute(int type,
int value)
public int getAttribute(int type)
public CollationKey getCollationKey(String source)
public String getRules()
public CollationElementIteratorICU getCollationElementIterator(String source)
public CollationElementIteratorICU getCollationElementIterator(CharacterIterator it)
public int hashCode()
ObjectObject.equals(java.lang.Object) returns true must return
the same hash code value. This means that subclasses of Object
usually override both methods or neither method.
Note that hash values must not change over time unless information used in equals comparisons also changes.
See Writing a correct
hashCode method
if you intend implementing your own hashCode method.
hashCode in class ObjectObject.equals(java.lang.Object)public boolean equals(Object object)
Objecto must represent the same object
as this instance using a class-specific comparison. The general contract
is that this comparison should be reflexive, symmetric, and transitive.
Also, no object reference other than null is equal to null.
The default implementation returns true only if this ==
o. See Writing a correct
equals method
if you intend implementing your own equals method.
The general contract for the equals and Object.hashCode() methods is that if equals returns true for
any two objects, then hashCode() must return the same value for
these objects. This means that subclasses of Object usually
override either both methods or neither of them.
equals in class Objectobject - the object to compare this instance with.true if the specified object is equal to this Object; false otherwise.Object.hashCode()protected void finalize()
throws Throwable
ObjectNote that objects that override finalize are significantly more expensive than
objects that don't. Finalizers may be run a long time after the object is no longer
reachable, depending on memory pressure, so it's a bad idea to rely on them for cleanup.
Note also that finalizers are run on a single VM-wide finalizer thread,
so doing blocking work in a finalizer is a bad idea. A finalizer is usually only necessary
for a class that has a native peer and needs to call a native method to destroy that peer.
Even then, it's better to provide an explicit close method (and implement
Closeable), and insist that callers manually dispose of instances. This
works well for something like files, but less well for something like a BigInteger
where typical calling code would have to deal with lots of temporaries. Unfortunately,
code that creates lots of temporaries is the worst kind of code from the point of view of
the single finalizer thread.
If you must use finalizers, consider at least providing your own
ReferenceQueue and having your own thread process that queue.
Unlike constructors, finalizers are not automatically chained. You are responsible for
calling super.finalize() yourself.
Uncaught exceptions thrown by finalizers are ignored and do not terminate the finalizer thread. See Effective Java Item 7, "Avoid finalizers" for more.