Java Doc for IntTrieBuilder.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.TrieBuilder
      com.ibm.icu.impl.IntTrieBuilder

IntTrieBuilder
public class IntTrieBuilder extends TrieBuilder (Code)
Builder class to manipulate and generate a trie. This is useful for ICU data in primitive types. Provides a compact way to store information that is indexed by Unicode values, such as character properties, types, keyboard values, etc. This is very useful when you have a block of Unicode data that contains significant values while the rest of the Unicode data is unused in the application or when you have a lot of redundance, such as where all 21,000 Han ideographs have the same value. However, lookup is much faster than a hash table. A trie of any primitive data type serves two purposes:
  • Fast access of the indexed values.
  • Smaller memory footprint.
This is a direct port from the ICU4C version
author:
   Syn Wee Quek


Field Summary
protected  intm_data_
    
protected  intm_initialValue_
    

Constructor Summary
public  IntTrieBuilder(IntTrieBuilder table)
    
public  IntTrieBuilder(int aliasdata, int maxdatalength, int initialvalue, int leadunitvalue, boolean latin1linear)
    

Method Summary
public  intgetValue(int ch)
    
public  intgetValue(int ch, boolean[] inBlockZero)
     Get a 32 bit data from the table data
Parameters:
  ch - code point for which data is to be retrieved.
Parameters:
  inBlockZero - Output parameter, inBlockZero[0] returns true if thechar maps into block zero, otherwise false.
public  IntTrieserialize(TrieBuilder.DataManipulate datamanipulate, Trie.DataManipulate triedatamanipulate)
    
public  intserialize(OutputStream os, boolean reduceTo16Bits, TrieBuilder.DataManipulate datamanipulate)
     Serializes the build table to an output stream. Compacts the build-time trie after all values are set, and then writes the serialized form onto an output stream. After this, this build-time Trie can only be serialized again and/or closed; no further values can be added. This function is the rough equivalent of utrie_seriaize() in ICU4C.
Parameters:
  os - the output stream to which the seriaized trie will be written.If nul, the function still returns the size of the serialized Trie.
Parameters:
  reduceTo16Bits - If true, reduce the data size to 16 bits.
public  booleansetRange(int start, int limit, int value, boolean overwrite)
     Set a value in a range of code points [start..limit].
public  booleansetValue(int ch, int value)
    

Field Detail
m_data_
protected int m_data_(Code)



m_initialValue_
protected int m_initialValue_(Code)




Constructor Detail
IntTrieBuilder
public IntTrieBuilder(IntTrieBuilder table)(Code)
Copy constructor



IntTrieBuilder
public IntTrieBuilder(int aliasdata, int maxdatalength, int initialvalue, int leadunitvalue, boolean latin1linear)(Code)
Constructs a build table
Parameters:
  aliasdata - data to be filled into table
Parameters:
  maxdatalength - maximum data length allowed in table
Parameters:
  initialvalue - inital data value
Parameters:
  latin1linear - is latin 1 to be linear




Method Detail
getValue
public int getValue(int ch)(Code)
Gets a 32 bit data from the table data
Parameters:
  ch - codepoint which data is to be retrieved the 32 bit data



getValue
public int getValue(int ch, boolean[] inBlockZero)(Code)
Get a 32 bit data from the table data
Parameters:
  ch - code point for which data is to be retrieved.
Parameters:
  inBlockZero - Output parameter, inBlockZero[0] returns true if thechar maps into block zero, otherwise false. the 32 bit data value.



serialize
public IntTrie serialize(TrieBuilder.DataManipulate datamanipulate, Trie.DataManipulate triedatamanipulate)(Code)
Serializes the build table with 32 bit data
Parameters:
  datamanipulate - builder raw fold method implementation
Parameters:
  triedatamanipulate - result trie fold method a new trie



serialize
public int serialize(OutputStream os, boolean reduceTo16Bits, TrieBuilder.DataManipulate datamanipulate) throws IOException(Code)
Serializes the build table to an output stream. Compacts the build-time trie after all values are set, and then writes the serialized form onto an output stream. After this, this build-time Trie can only be serialized again and/or closed; no further values can be added. This function is the rough equivalent of utrie_seriaize() in ICU4C.
Parameters:
  os - the output stream to which the seriaized trie will be written.If nul, the function still returns the size of the serialized Trie.
Parameters:
  reduceTo16Bits - If true, reduce the data size to 16 bits. The resultingserialized form can then be used to create a CharTrie.
Parameters:
  datamanipulate - builder raw fold method implementation the number of bytes written to the output stream.



setRange
public boolean setRange(int start, int limit, int value, boolean overwrite)(Code)
Set a value in a range of code points [start..limit]. All code points c with start <= c < limit will get the value if overwrite is true or if the old value is 0.
Parameters:
  start - the first code point to get the value
Parameters:
  limit - one past the last code point to get the value
Parameters:
  value - the value
Parameters:
  overwrite - flag for whether old non-initial values are to be overwritten false if a failure occurred (illegal argument or data array overrun)



setValue
public boolean setValue(int ch, int value)(Code)
Sets a 32 bit data in the table data
Parameters:
  ch - codepoint which data is to be set
Parameters:
  value - to set true if the set is successful, otherwise if the table has been compacted return false



Fields inherited from com.ibm.icu.impl.TrieBuilder
final protected static int BMP_INDEX_LENGTH_(Code)(Java Doc)
final public static int DATA_BLOCK_LENGTH(Code)(Java Doc)
final protected static int DATA_GRANULARITY_(Code)(Java Doc)
final protected static int INDEX_SHIFT_(Code)(Java Doc)
final protected static int MASK_(Code)(Java Doc)
final protected static int MAX_DATA_LENGTH_(Code)(Java Doc)
final protected static int MAX_INDEX_LENGTH_(Code)(Java Doc)
final protected static int OPTIONS_DATA_IS_32_BIT_(Code)(Java Doc)
final protected static int OPTIONS_INDEX_SHIFT_(Code)(Java Doc)
final protected static int OPTIONS_LATIN1_IS_LINEAR_(Code)(Java Doc)
final protected static int SHIFT_(Code)(Java Doc)
final protected static int SURROGATE_BLOCK_COUNT_(Code)(Java Doc)
protected int m_dataCapacity_(Code)(Java Doc)
protected int m_dataLength_(Code)(Java Doc)
protected int m_indexLength_(Code)(Java Doc)
protected int m_index_(Code)(Java Doc)
protected boolean m_isCompacted_(Code)(Java Doc)
protected boolean m_isLatin1Linear_(Code)(Java Doc)
protected int m_map_(Code)(Java Doc)

Methods inherited from com.ibm.icu.impl.TrieBuilder
final protected static boolean equal_int(int[] array, int start1, int start2, int length)(Code)(Java Doc)
final protected static int findSameIndexBlock(int index, int indexLength, int otherBlock)(Code)(Java Doc)
protected void findUnusedBlocks()(Code)(Java Doc)
public boolean isInZeroBlock(int ch)(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.