Java in a Nutshell, 5th Edition [Electronic resources]

نسخه متنی -صفحه : 1191/ 676
نمايش فراداده

RuleBasedCollatorjava.text

Java 1.1cloneable

This class is a concrete subclass of the abstract Collator class. It performs collations using a table of rules that are specified in textual form. Most applications do not use this class directly; instead they call Collator.getInstance( ) to obtain a Collator object (typically a RuleBasedCollator object) that implements the default collation order for a specified or default locale. You should need to use this class only if you are collating strings for a locale that is not supported by default or if you need to implement a highly customized collation order.

Figure 15-15. java.text.RuleBasedCollator

public class

RuleBasedCollator extends Collator { // Public Constructors public

RuleBasedCollator (String

rules ) throws ParseException; // Public Instance Methods

1.2 public CollationElementIterator

getCollationElementIterator (CharacterIterator

source ); public CollationElementIterator

getCollationElementIterator (String

source ); public String

getRules ( ); // Public Methods Overriding Collator public Object

clone ( ); public int

compare (String

source , String

target ); synchronized public boolean

equals (Object

obj ); public CollationKey

getCollationKey (String

source ); synchronized public int

hashCode ( ); }