public class

IntTrie

extends Trie
java.lang.Object
   ↳ sun.text.normalizer.Trie
     ↳ sun.text.normalizer.IntTrie

Class Overview

Trie implementation which stores data in int, 32 bits.

See Also
  • com.ibm.icu.impl.Trie

Summary

[Expand]
Inherited Constants
From class sun.text.normalizer.Trie
[Expand]
Inherited Fields
From class sun.text.normalizer.Trie
Public Constructors
IntTrie(InputStream inputStream, Trie.DataManipulate datamanipulate)

Creates a new Trie with the settings for the trie data.

Public Methods
final int getCodePointValue(int ch)
Gets the value associated with the codepoint.
final int getLeadValue(char ch)
Gets the value to the data which this lead surrogate character points to.
final int getTrailValue(int leadvalue, char trail)
Get a value from a folding offset (from the value of a lead surrogate) and a trail surrogate.
Protected Methods
final int getInitialValue()
Gets the default initial value
final int getSurrogateOffset(char lead, char trail)
Gets the offset to the data which the surrogate pair points to.
final int getValue(int index)
Gets the value at the argument index.
final void unserialize(InputStream inputStream)

Parses the input stream and stores its trie content into a index and data array

[Expand]
Inherited Methods
From class sun.text.normalizer.Trie
From class java.lang.Object

Public Constructors

public IntTrie (InputStream inputStream, Trie.DataManipulate datamanipulate)

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
Throws
IOException thrown when data reading fails

Public Methods

public final int getCodePointValue (int ch)

Gets the value associated with the codepoint. If no value is associated with the codepoint, a default value will be returned.

Parameters
ch codepoint
Returns
  • offset to data

public final int getLeadValue (char ch)

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
Returns
  • data value

public final int getTrailValue (int leadvalue, char trail)

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 the folding offset
trail surrogate
Returns
  • trie data value associated with the trail character

Protected Methods

protected final int getInitialValue ()

Gets the default initial value

Returns
  • 32 bit value

protected final int getSurrogateOffset (char lead, char trail)

Gets the offset to the data which the surrogate pair points to.

Parameters
lead lead surrogate
trail trailing surrogate
Returns
  • offset to data

protected final int getValue (int index)

Gets the value at the argument index. For use internally in TrieIterator

Parameters
index value at index will be retrieved
Returns
  • 32 bit value
See Also
  • com.ibm.icu.impl.TrieIterator

protected final void unserialize (InputStream inputStream)

Parses the input stream and stores its trie content into a index and data array

Parameters
inputStream data input stream containing trie data
Throws
IOException thrown when data reading fails