API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.text. Collator View Source
Author(s)
Helena Shih, Laura Werner, Richard Gillam
Since
Version
1.46, 07/23/06
Serial
Hierarchy
 Object
      Collator
Implements
 Comparator
 Cloneable
Subclasses
Description
publicabstract abstract class Collator
  The Collator class performs locale-sensitive String comparison.
Constructors
protected Collator ()
  Default constructor.
Methods
Hide/Show inherited methods
public Object clone ()
Overrides Cloneable
public int compare (Object o1, Object o2)
  Compares its two arguments for order.
publicabstract int compare (String source, String target)
  Compares the source string to the target string according to the collation rules for this Collator.
public boolean equals (Object that) [Specified in Comparator]
  Compares the equality of two Collators.
public boolean equals (String source, String target)
  Convenience method for comparing the equality of two strings based on this Collator's collation rules.
publicstaticsynchronized Locale getAvailableLocales ()
  Returns an array of all locales for which the getInstance methods of this class can return localized instances.
publicabstract CollationKey getCollationKey (String source)
  Transforms the String into a series of bits that can be compared bitwise to other CollationKeys.
publicsynchronized int getDecomposition ()
  Get the decomposition mode of this Collator.
publicstaticsynchronized Collator getInstance ()
  Gets the Collator for the current default locale.
publicstaticsynchronized Collator getInstance (Locale desiredLocale)
  Gets the Collator for the desired locale.
publicsynchronized int getStrength ()
  Returns this Collator's strength property.
publicabstract int hashCode ()
Generates the hash code for this Collator.
publicsynchronized void setDecomposition (int decompositionMode)
  Set the decomposition mode of this Collator.
publicsynchronized void setStrength (int newStrength)
  Sets this Collator's strength property.
Fields
Hide/Show inherited fields
publicfinalstatic int CANONICAL_DECOMPOSITION = "1"
  Decomposition mode value.
pack-privatefinalstatic int EQUAL = "0"
  EQUAL is returned if source string is compared to be equal to target string in the compare() method.
publicfinalstatic int FULL_DECOMPOSITION = "2"
  Decomposition mode value.
pack-privatefinalstatic int GREATER = "1"
  GREATER is returned if source string is compared to be greater than target string in the compare() method.
publicfinalstatic int IDENTICAL = "3"
  Collator strength value.
pack-privatefinalstatic int LESS = "-1"
  LESS is returned if source string is compared to be less than target string in the compare() method.
publicfinalstatic int NO_DECOMPOSITION = "0"
  Decomposition mode value.
publicfinalstatic int PRIMARY = "0"
  Collator strength value.
publicfinalstatic int SECONDARY = "1"
  Collator strength value.
publicfinalstatic int TERTIARY = "2"
  Collator strength value.
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar