java.text
Class RBCollationTables

java.lang.Object
  extended byjava.text.RBCollationTables

final class RBCollationTables
extends Object

This class contains the static state of a RuleBasedCollator: The various tables that are used by the collation routines. Several RuleBasedCollators can share a single RBCollationTables object, easing memory requirements and improving performance.


Nested Class Summary
(package private)  class RBCollationTables.BuildAPI
           
 
Field Summary
(package private) static int CONTRACTCHARINDEX
           
private  sun.text.IntHashtable contractFlags
           
private  Vector contractTable
           
(package private) static int EXPANDCHARINDEX
           
private  Vector expandTable
           
private  boolean frenchSec
           
private  sun.text.CompactIntArray mapping
           
private  short maxSecOrder
           
private  short maxTerOrder
           
(package private) static int PRIMARYDIFFERENCEONLY
           
(package private) static int PRIMARYORDERMASK
           
(package private) static int PRIMARYORDERSHIFT
           
private  String rules
           
private  boolean seAsianSwapping
           
(package private) static int SECONDARYDIFFERENCEONLY
           
(package private) static int SECONDARYORDERMASK
           
(package private) static int SECONDARYORDERSHIFT
           
(package private) static int TERTIARYORDERMASK
           
(package private) static int UNMAPPED
           
 
Constructor Summary
RBCollationTables(String rules, int decmp)
           
 
Method Summary
(package private)  Vector getContractValues(char ch)
          Get the entry of hash table of the contracting string in the collation table.
(package private)  Vector getContractValues(int index)
           
(package private) static int getEntry(Vector list, String name, boolean fwd)
           
(package private)  int[] getExpandValueList(int order)
          Get the entry of hash table of the expanding string in the collation table.
(package private)  int getMaxExpansion(int order)
          Return the maximum length of any expansion sequences that end with the specified comparison order.
(package private)  short getMaxSecOrder()
           
(package private)  short getMaxTerOrder()
           
 String getRules()
          Gets the table-based rules for the collation object.
(package private)  int getUnicodeOrder(char ch)
          Get the comarison order of a character from the collation table.
 boolean isFrenchSec()
           
 boolean isSEAsianSwapping()
           
(package private) static void reverse(StringBuffer result, int from, int to)
          Reverse a string.
(package private)  boolean usedInContractSeq(char c)
          Returns true if this character appears anywhere in a contracting character sequence.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXPANDCHARINDEX

static final int EXPANDCHARINDEX
See Also:
Constant Field Values

CONTRACTCHARINDEX

static final int CONTRACTCHARINDEX
See Also:
Constant Field Values

UNMAPPED

static final int UNMAPPED
See Also:
Constant Field Values

PRIMARYORDERMASK

static final int PRIMARYORDERMASK
See Also:
Constant Field Values

SECONDARYORDERMASK

static final int SECONDARYORDERMASK
See Also:
Constant Field Values

TERTIARYORDERMASK

static final int TERTIARYORDERMASK
See Also:
Constant Field Values

PRIMARYDIFFERENCEONLY

static final int PRIMARYDIFFERENCEONLY
See Also:
Constant Field Values

SECONDARYDIFFERENCEONLY

static final int SECONDARYDIFFERENCEONLY
See Also:
Constant Field Values

PRIMARYORDERSHIFT

static final int PRIMARYORDERSHIFT
See Also:
Constant Field Values

SECONDARYORDERSHIFT

static final int SECONDARYORDERSHIFT
See Also:
Constant Field Values

rules

private String rules

frenchSec

private boolean frenchSec

seAsianSwapping

private boolean seAsianSwapping

mapping

private sun.text.CompactIntArray mapping

contractTable

private Vector contractTable

expandTable

private Vector expandTable

contractFlags

private sun.text.IntHashtable contractFlags

maxSecOrder

private short maxSecOrder

maxTerOrder

private short maxTerOrder
Constructor Detail

RBCollationTables

public RBCollationTables(String rules,
                         int decmp)
                  throws ParseException
Method Detail

getRules

public String getRules()
Gets the table-based rules for the collation object.

Returns:
returns the collation rules that the table collation object was created from.

isFrenchSec

public boolean isFrenchSec()

isSEAsianSwapping

public boolean isSEAsianSwapping()

getContractValues

Vector getContractValues(char ch)
Get the entry of hash table of the contracting string in the collation table.

Parameters:
ch - the starting character of the contracting string

getContractValues

Vector getContractValues(int index)

usedInContractSeq

boolean usedInContractSeq(char c)
Returns true if this character appears anywhere in a contracting character sequence. (Used by CollationElementIterator.setOffset().)


getMaxExpansion

int getMaxExpansion(int order)
Return the maximum length of any expansion sequences that end with the specified comparison order.

Parameters:
order - a collation order returned by previous or next.
Returns:
the maximum length of any expansion seuences ending with the specified order.
See Also:
CollationElementIterator.getMaxExpansion(int)

getExpandValueList

final int[] getExpandValueList(int order)
Get the entry of hash table of the expanding string in the collation table.


getUnicodeOrder

int getUnicodeOrder(char ch)
Get the comarison order of a character from the collation table.

Returns:
the comparison order of a character.

getMaxSecOrder

short getMaxSecOrder()

getMaxTerOrder

short getMaxTerOrder()

reverse

static void reverse(StringBuffer result,
                    int from,
                    int to)
Reverse a string.


getEntry

static final int getEntry(Vector list,
                          String name,
                          boolean fwd)