APIdia Launch Partner
Top Description Inners Fields Constructors Methods
java.text

pack-priv final Class RBCollationTables

extends Object
Class Inheritance
Imports
java.util.Vector, sun.text.UCompactIntArray, .IntHashtable

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 and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class

Field Summary

Modifier and TypeField and Description
pack-priv static final int
private IntHashtable
private Vector<Vector<EntryPair>>
pack-priv static final int
private Vector<int[]>
private boolean
private UCompactIntArray
private short
private short
pack-priv static final int
pack-priv static final int
pack-priv static final int
private String
private boolean
pack-priv static final int
pack-priv static final int
pack-priv static final int
pack-priv static final int
pack-priv static final int

Constructor Summary

AccessConstructor and Description
public
RBCollationTables(String rules, int decmp)

Method Summary

Modifier and TypeMethod and Description
pack-priv Vector<EntryPair>
getContractValues(int
the starting character of the contracting string
ch
)

Get the entry of hash table of the contracting string in the collation table.

private Vector<EntryPair>
pack-priv static final int
getEntry(Vector<EntryPair> list, String name, boolean fwd)

pack-priv final int[]
getExpandValueList(int
the index of the expanding string value list
idx
)

Get the entry of hash table of the expanding string in the collation table.

pack-priv int

Returns:

the maximum length of any expansion sequences ending with the specified order.
getMaxExpansion
(int
a collation order returned by previous or next.
order
)

Return the maximum length of any expansion sequences that end with the specified comparison order.

pack-priv short
pack-priv short
public String

Returns:

returns the collation rules that the table collation object was created from.
getRules
()

Gets the table-based rules for the collation object.

pack-priv int

Returns:

the comparison order of a character.
getUnicodeOrder
(int ch)

Get the comarison order of a character from the collation table.

public boolean
public boolean
pack-priv static void
reverse(StringBuilder result, int from, int to)

Reverse a string.

pack-priv boolean
usedInContractSeq(int c)

Returns true if this character appears anywhere in a contracting character sequence.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CONTRACTCHARINDEXback to summary
pack-priv static final int CONTRACTCHARINDEX
contractFlagsback to summary
private IntHashtable contractFlags
contractTableback to summary
private Vector<Vector<EntryPair>> contractTable
EXPANDCHARINDEXback to summary
pack-priv static final int EXPANDCHARINDEX
expandTableback to summary
private Vector<int[]> expandTable
frenchSecback to summary
private boolean frenchSec
mappingback to summary
private UCompactIntArray mapping
maxSecOrderback to summary
private short maxSecOrder
maxTerOrderback to summary
private short maxTerOrder
PRIMARYDIFFERENCEONLYback to summary
pack-priv static final int PRIMARYDIFFERENCEONLY
PRIMARYORDERMASKback to summary
pack-priv static final int PRIMARYORDERMASK
PRIMARYORDERSHIFTback to summary
pack-priv static final int PRIMARYORDERSHIFT
rulesback to summary
private String rules
seAsianSwappingback to summary
private boolean seAsianSwapping
SECONDARYDIFFERENCEONLYback to summary
pack-priv static final int SECONDARYDIFFERENCEONLY
SECONDARYORDERMASKback to summary
pack-priv static final int SECONDARYORDERMASK
SECONDARYORDERSHIFTback to summary
pack-priv static final int SECONDARYORDERSHIFT
TERTIARYORDERMASKback to summary
pack-priv static final int TERTIARYORDERMASK
UNMAPPEDback to summary
pack-priv static final int UNMAPPED

Constructor Detail

RBCollationTablesback to summary
public RBCollationTables(String rules, int decmp) throws ParseException

Method Detail

getContractValuesback to summary
pack-priv Vector<EntryPair> getContractValues(int ch)

Get the entry of hash table of the contracting string in the collation table.

Parameters
ch:int

the starting character of the contracting string

getContractValuesImplback to summary
private Vector<EntryPair> getContractValuesImpl(int index)
getEntryback to summary
pack-priv static final int getEntry(Vector<EntryPair> list, String name, boolean fwd)
getExpandValueListback to summary
pack-priv final int[] getExpandValueList(int idx)

Get the entry of hash table of the expanding string in the collation table.

Parameters
idx:int

the index of the expanding string value list

getMaxExpansionback to summary
pack-priv int getMaxExpansion(int order)

Return the maximum length of any expansion sequences that end with the specified comparison order.

Parameters
order:int

a collation order returned by previous or next.

Returns:int

the maximum length of any expansion sequences ending with the specified order.

See Also
CollationElementIterator#getMaxExpansion
getMaxSecOrderback to summary
pack-priv short getMaxSecOrder()
getMaxTerOrderback to summary
pack-priv short getMaxTerOrder()
getRulesback to summary
public String getRules()

Gets the table-based rules for the collation object.

Returns:String

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

getUnicodeOrderback to summary
pack-priv int getUnicodeOrder(int ch)

Get the comarison order of a character from the collation table.

Returns:int

the comparison order of a character.

isFrenchSecback to summary
public boolean isFrenchSec()
isSEAsianSwappingback to summary
public boolean isSEAsianSwapping()
reverseback to summary
pack-priv static void reverse(StringBuilder result, int from, int to)

Reverse a string.

usedInContractSeqback to summary
pack-priv boolean usedInContractSeq(int c)

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

java.text back to summary

pack-priv final Class RBCollationTables.BuildAPI

extends Object
Class Inheritance

Constructor Summary

AccessConstructor and Description
private
BuildAPI()

Private constructor.

Method Summary

Modifier and TypeMethod and Description
pack-priv void
fillInTables(boolean
The value for frenchSec (the French-secondary flag)
f2ary
,
boolean
The value for SE Asian swapping rule
swap
,
UCompactIntArray
The collator's character-mapping table (the value for mapping)
map
,
Vector<Vector<EntryPair>>
The collator's contracting-character table (the value for contractTable)
cTbl
,
Vector<int[]>
The collator's expanding-character table (the value for expandTable)
eTbl
,
IntHashtable
The hash table of characters that participate in contracting- character sequences (the value for contractFlags)
cFlgs
,
short
The value for maxSecOrder
mso
,
short
The value for maxTerOrder
mto
)

This function is used by RBTableBuilder to fill in all the members of this object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

BuildAPIback to summary
private BuildAPI()

Private constructor. Prevents anyone else besides RBTableBuilder from gaining direct access to the internals of this class.

Method Detail

fillInTablesback to summary
pack-priv void fillInTables(boolean f2ary, boolean swap, UCompactIntArray map, Vector<Vector<EntryPair>> cTbl, Vector<int[]> eTbl, IntHashtable cFlgs, short mso, short mto)

This function is used by RBTableBuilder to fill in all the members of this object. (Effectively, the builder class functions as a "friend" of this class, but to avoid changing too much of the logic, it carries around "shadow" copies of all these variables until the end of the build process and then copies them en masse into the actual tables object once all the construction logic is complete. This function does that "copying en masse".

Parameters
f2ary:boolean

The value for frenchSec (the French-secondary flag)

swap:boolean

The value for SE Asian swapping rule

map:UCompactIntArray

The collator's character-mapping table (the value for mapping)

cTbl:Vector<Vector<EntryPair>>

The collator's contracting-character table (the value for contractTable)

eTbl:Vector<int[]>

The collator's expanding-character table (the value for expandTable)

cFlgs:IntHashtable

The hash table of characters that participate in contracting- character sequences (the value for contractFlags)

mso:short

The value for maxSecOrder

mto:short

The value for maxTerOrder