| java.lang.Object com.ibm.icu.impl.Trie com.ibm.icu.impl.IntTrie
IntTrie | public class IntTrie extends Trie (Code) | | Trie implementation which stores data in int, 32 bits.
author: synwee See Also: com.ibm.icu.impl.Trie since: release 2.1, Jan 01 2002 |
Constructor Summary | |
public | IntTrie(InputStream inputStream, DataManipulate dataManipulate) | public | IntTrie(int initialValue, int leadUnitValue, DataManipulate dataManipulate) Make a dummy IntTrie. | | IntTrie(char index, int data, int initialvalue, int options, DataManipulate datamanipulate) |
Method Summary | |
public boolean | equals(Object other) | final public int | getBMPValue(char ch) Get the value associated with the BMP code point. | final public int | getCodePointValue(int ch) Gets the value associated with the codepoint. | final protected int | getInitialValue() | final public int | getLatin1LinearValue(char ch) | final public int | getLeadValue(char ch) Gets the value to the data which this lead surrogate character points
to. | final protected int | getSurrogateOffset(char lead, char trail) Gets the offset to the data which the surrogate pair points to. | final public int | getSurrogateValue(char lead, char trail) Get the value associated with a pair of surrogates. | final public int | getTrailValue(int leadvalue, char trail) Get a value from a folding offset (from the value of a lead surrogate)
and a trail surrogate. | final protected int | getValue(int index) Gets the value at the argument index. | final protected void | unserialize(InputStream inputStream) |
IntTrie | public IntTrie(InputStream inputStream, DataManipulate dataManipulate) throws IOException(Code) | | Creates a new Trie with the settings for the trie data.
Unserialize the 32-bit-aligned input stream and use the data for the
trie.
Parameters: inputStream - file input stream to a ICU data file, containing the trie Parameters: dataManipulate - object which provides methods to parse the char data throws: IOException - thrown when data reading fails |
IntTrie | public IntTrie(int initialValue, int leadUnitValue, DataManipulate dataManipulate)(Code) | | Make a dummy IntTrie.
A dummy trie is an empty runtime trie, used when a real data trie cannot
be loaded.
The trie always returns the initialValue,
or the leadUnitValue for lead surrogate code points.
The Latin-1 part is always set up to be linear.
Parameters: initialValue - the initial value that is set for all code points Parameters: leadUnitValue - the value for lead surrogate code _units_ that do nothave associated supplementary data Parameters: dataManipulate - object which provides methods to parse the char data |
IntTrie | IntTrie(char index, int data, int initialvalue, int options, DataManipulate datamanipulate)(Code) | | Internal constructor for builder use
Parameters: index - the index array to be slotted into this trie Parameters: data - the data array to be slotted into this trie Parameters: initialvalue - the initial value for this trie Parameters: options - trie options to use Parameters: datamanipulate - folding implementation |
equals | public boolean equals(Object other)(Code) | | Checks if the argument Trie has the same data as this Trie
Parameters: other - Trie to check true if the argument Trie has the same data as this Trie, falseotherwise |
getBMPValue | final public int getBMPValue(char ch)(Code) | | Get the value associated with the BMP code point.
Lead surrogate code points are treated as normal code points, with
unfolded values that may differ from getLeadValue() results.
Parameters: ch - the input BMP code point trie data value associated with the BMP codepoint |
getCodePointValue | final public int getCodePointValue(int ch)(Code) | | Gets the value associated with the codepoint.
If no value is associated with the codepoint, a default value will be
returned.
Parameters: ch - codepoint offset to data |
getInitialValue | final protected int getInitialValue()(Code) | | Gets the default initial value
32 bit value |
getLatin1LinearValue | final public int getLatin1LinearValue(char ch)(Code) | | Gets the latin 1 fast path value.
Note this only works if latin 1 characters have their own linear
array.
Parameters: ch - latin 1 characters value associated with latin character |
getLeadValue | final public int getLeadValue(char ch)(Code) | | Gets the value to the data which this lead surrogate character points
to.
Returned data may contain folding offset information for the next
trailing surrogate character.
This method does not guarantee correct results for trail surrogates.
Parameters: ch - lead surrogate character data value |
getSurrogateOffset | final protected int getSurrogateOffset(char lead, char trail)(Code) | | Gets the offset to the data which the surrogate pair points to.
Parameters: lead - lead surrogate Parameters: trail - trailing surrogate offset to data |
getSurrogateValue | final public int getSurrogateValue(char lead, char trail)(Code) | | Get the value associated with a pair of surrogates.
Parameters: lead - a lead surrogate Parameters: trail - a trail surrogate |
getTrailValue | final public int getTrailValue(int leadvalue, char trail)(Code) | | Get a value from a folding offset (from the value of a lead surrogate)
and a trail surrogate.
Parameters: leadvalue - the value of a lead surrogate that contains thefolding offset Parameters: trail - surrogate trie data value associated with the trail character |
getValue | final protected int getValue(int index)(Code) | | Gets the value at the argument index.
For use internally in TrieIterator
Parameters: index - value at index will be retrieved 32 bit value See Also: com.ibm.icu.impl.TrieIterator |
unserialize | final protected void unserialize(InputStream inputStream) throws IOException(Code) | | Parses the input stream and stores its trie content into a index and
data array
Parameters: inputStream - data input stream containing trie data exception: IOException - thrown when data reading fails |
|
|