Java Doc for CharTrie.java in  » Internationalization-Localization » icu4j » com » ibm » icu » impl » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Internationalization Localization » icu4j » com.ibm.icu.impl 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.ibm.icu.impl.Trie
      com.ibm.icu.impl.CharTrie

CharTrie
public class CharTrie extends Trie (Code)
Trie implementation which stores data in char, 16 bits.
author:
   synwee
See Also:   com.ibm.icu.impl.Trie
since:
   release 2.1, Jan 01 2002

Inner Class :public class FriendAgent


Constructor Summary
public  CharTrie(InputStream inputStream, DataManipulate dataManipulate)
    
public  CharTrie(int initialValue, int leadUnitValue, DataManipulate dataManipulate)
     Make a dummy CharTrie.

Method Summary
public  booleanequals(Object other)
    
final public  chargetBMPValue(char ch)
     Get the value associated with the BMP code point.
final public  chargetCodePointValue(int ch)
     Gets the value associated with the codepoint.
final protected  intgetInitialValue()
    
final public  chargetLatin1LinearValue(char ch)
    
final public  chargetLeadValue(char ch)
     Gets the value to the data which this lead surrogate character points to.
final protected  intgetSurrogateOffset(char lead, char trail)
     Gets the offset to the data which the surrogate pair points to.
final public  chargetSurrogateValue(char lead, char trail)
     Get the value associated with a pair of surrogates.
final public  chargetTrailValue(int leadvalue, char trail)
    
final protected  intgetValue(int index)
     Gets the value at the argument index.
public  voidputIndexData(UCharacterProperty friend)
     Java friend implementation To store the index and data array into the argument.
final protected  voidunserialize(InputStream inputStream)
    


Constructor Detail
CharTrie
public CharTrie(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



CharTrie
public CharTrie(int initialValue, int leadUnitValue, DataManipulate dataManipulate)(Code)
Make a dummy CharTrie. 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




Method Detail
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 char 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 char 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 char 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 char 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 char 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 char getTrailValue(int leadvalue, char trail)(Code)

Get a value from a folding offset (from the value of a lead surrogate) and a trail surrogate.

If the
Parameters:
  leadvalue - value associated with the lead surrogate which containsthe folding 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



putIndexData
public void putIndexData(UCharacterProperty friend)(Code)
Java friend implementation To store the index and data array into the argument.
Parameters:
  friend - java friend UCharacterProperty object to store the array



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



Fields inherited from com.ibm.icu.impl.Trie
final protected static int BMP_INDEX_LENGTH(Code)(Java Doc)
final protected static int DATA_BLOCK_LENGTH(Code)(Java Doc)
final protected static int HEADER_LENGTH_(Code)(Java Doc)
final protected static int HEADER_OPTIONS_DATA_IS_32_BIT_(Code)(Java Doc)
final protected static int HEADER_OPTIONS_INDEX_SHIFT_(Code)(Java Doc)
final protected static int HEADER_OPTIONS_LATIN1_IS_LINEAR_MASK_(Code)(Java Doc)
final protected static int HEADER_SIGNATURE_(Code)(Java Doc)
final protected static int INDEX_STAGE_1_SHIFT_(Code)(Java Doc)
final protected static int INDEX_STAGE_2_SHIFT_(Code)(Java Doc)
final protected static int INDEX_STAGE_3_MASK_(Code)(Java Doc)
final protected static int LEAD_INDEX_OFFSET_(Code)(Java Doc)
final protected static int SURROGATE_BLOCK_BITS(Code)(Java Doc)
final protected static int SURROGATE_BLOCK_COUNT(Code)(Java Doc)
final protected static int SURROGATE_MASK_(Code)(Java Doc)
protected int m_dataLength_(Code)(Java Doc)
protected DataManipulate m_dataManipulate_(Code)(Java Doc)
protected int m_dataOffset_(Code)(Java Doc)
protected char m_index_(Code)(Java Doc)

Methods inherited from com.ibm.icu.impl.Trie
public boolean equals(Object other)(Code)(Java Doc)
final protected int getBMPOffset(char ch)(Code)(Java Doc)
final protected int getCodePointOffset(int ch)(Code)(Java Doc)
abstract protected int getInitialValue()(Code)(Java Doc)
final protected int getLeadOffset(char ch)(Code)(Java Doc)
final protected int getRawOffset(int offset, char ch)(Code)(Java Doc)
public int getSerializedDataSize()(Code)(Java Doc)
abstract protected int getSurrogateOffset(char lead, char trail)(Code)(Java Doc)
abstract protected int getValue(int index)(Code)(Java Doc)
final protected boolean isCharTrie()(Code)(Java Doc)
final protected boolean isIntTrie()(Code)(Java Doc)
final public boolean isLatin1Linear()(Code)(Java Doc)
protected void unserialize(InputStream inputStream) throws IOException(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.