Class Overview
Trie implementation which stores data in int, 32 bits.
Summary
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
final
int
|
getBMPOffset(char ch)
Gets the offset to data which the BMP character points to
Treats a lead surrogate as a normal code point.
|
final
int
|
getCodePointOffset(int ch)
Internal trie getter from a code point.
|
abstract
int
|
getInitialValue()
Gets the default initial value
|
final
int
|
getLeadOffset(char ch)
Gets the offset to the data which this lead surrogate character points
to.
|
final
int
|
getRawOffset(int offset, char ch)
Gets the offset to the data which the index ch after variable offset
points to.
|
abstract
int
|
getSurrogateOffset(char lead, char trail)
Gets the offset to the data which the surrogate pair points to.
|
abstract
int
|
getValue(int index)
Gets the value at the argument index
|
final
boolean
|
isCharTrie()
Determines if this is a 16 bit trie
|
final
boolean
|
isIntTrie()
Determines if this is a 32 bit trie
|
void
|
unserialize(InputStream inputStream)
Parses the inputstream and creates the trie index with it.
|
|
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait()
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object.
|
final
void
|
wait(long timeout, int nanos)
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object, or
some other thread interrupts the current thread, or a certain
amount of real time has elapsed.
|
final
void
|
wait(long timeout)
Causes the current thread to wait until either another thread invokes the
notify() method or the
notifyAll() method for this object, or a
specified amount of time has elapsed.
|
|
Public Constructors
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 |
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.
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 |
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
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 |
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 |
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 |