Java Doc for TrieBuilder.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

All known Subclasses:   com.ibm.icu.impl.IntTrieBuilder,
TrieBuilder
public class 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

Inner Class :public static interface DataManipulate

Field Summary
final protected static  intBMP_INDEX_LENGTH_
     Length of the BMP portion of the index (stage 1) array.
final public static  intDATA_BLOCK_LENGTH
     Number of data values in a stage 2 (data array) block.
final protected static  intDATA_GRANULARITY_
     The alignment size of a stage 2 data block.
final protected static  intINDEX_SHIFT_
     Shift size for shifting left the index array values.
final protected static  intMASK_
     Mask for getting the lower bits from the input index.
final protected static  intMAX_DATA_LENGTH_
     Maximum length of the runtime data (stage 2) array.
final protected static  intMAX_INDEX_LENGTH_
     Length of the index (stage 1) array before folding.
final protected static  intOPTIONS_DATA_IS_32_BIT_
     If set, then the data (stage 2) array is 32 bits wide.
final protected static  intOPTIONS_INDEX_SHIFT_
    
final protected static  intOPTIONS_LATIN1_IS_LINEAR_
     If set, then Latin-1 data (for U+0000..U+00ff) is stored in the data (stage 2) array as a simple, linear array at data + DATA_BLOCK_LENGTH.
final protected static  intSHIFT_
     Shift size for shifting right the input index.
final protected static  intSURROGATE_BLOCK_COUNT_
     Number of index (stage 1) entries per lead surrogate. Same as number of indexe entries for 1024 trail surrogates, ==0x400>>UTRIE_SHIFT 10 - SHIFT == Number of bits of a trail surrogate that are used in index table lookups.
protected  intm_dataCapacity_
    
protected  intm_dataLength_
    
protected  intm_indexLength_
    
protected  intm_index_
     Index values at build-time are 32 bits wide for easier processing.
protected  booleanm_isCompacted_
    
protected  booleanm_isLatin1Linear_
    
protected  intm_map_
     Map of adjusted indexes, used in utrie_compact().

Constructor Summary
protected  TrieBuilder()
    
protected  TrieBuilder(TrieBuilder table)
    

Method Summary
final protected static  booleanequal_int(int[] array, int start1, int start2, int length)
     Compare two sections of an array for equality.
final protected static  intfindSameIndexBlock(int index, int indexLength, int otherBlock)
    
protected  voidfindUnusedBlocks()
     Set a value in the trie index map to indicate which data block is referenced and which one is not.
public  booleanisInZeroBlock(int ch)
    

Field Detail
BMP_INDEX_LENGTH_
final protected static int BMP_INDEX_LENGTH_(Code)
Length of the BMP portion of the index (stage 1) array.



DATA_BLOCK_LENGTH
final public static int DATA_BLOCK_LENGTH(Code)
Number of data values in a stage 2 (data array) block. 2, 4, 8, .., 0x200



DATA_GRANULARITY_
final protected static int DATA_GRANULARITY_(Code)
The alignment size of a stage 2 data block. Also the granularity for compaction.



INDEX_SHIFT_
final protected static int INDEX_SHIFT_(Code)
Shift size for shifting left the index array values. Increases possible data size with 16-bit index values at the cost of compactability. This requires blocks of stage 2 data to be aligned by UTRIE_DATA_GRANULARITY. 0..UTRIE_SHIFT



MASK_
final protected static int MASK_(Code)
Mask for getting the lower bits from the input index. DATA_BLOCK_LENGTH - 1.



MAX_DATA_LENGTH_
final protected static int MAX_DATA_LENGTH_(Code)
Maximum length of the runtime data (stage 2) array. Limited by 16-bit index values that are left-shifted by INDEX_SHIFT_.



MAX_INDEX_LENGTH_
final protected static int MAX_INDEX_LENGTH_(Code)
Length of the index (stage 1) array before folding. Maximum number of Unicode code points (0x110000) shifted right by SHIFT.



OPTIONS_DATA_IS_32_BIT_
final protected static int OPTIONS_DATA_IS_32_BIT_(Code)
If set, then the data (stage 2) array is 32 bits wide.



OPTIONS_INDEX_SHIFT_
final protected static int OPTIONS_INDEX_SHIFT_(Code)
Shifting to position the index value in options



OPTIONS_LATIN1_IS_LINEAR_
final protected static int OPTIONS_LATIN1_IS_LINEAR_(Code)
If set, then Latin-1 data (for U+0000..U+00ff) is stored in the data (stage 2) array as a simple, linear array at data + DATA_BLOCK_LENGTH.



SHIFT_
final protected static int SHIFT_(Code)
Shift size for shifting right the input index. 1..9



SURROGATE_BLOCK_COUNT_
final protected static int SURROGATE_BLOCK_COUNT_(Code)
Number of index (stage 1) entries per lead surrogate. Same as number of indexe entries for 1024 trail surrogates, ==0x400>>UTRIE_SHIFT 10 - SHIFT == Number of bits of a trail surrogate that are used in index table lookups.



m_dataCapacity_
protected int m_dataCapacity_(Code)



m_dataLength_
protected int m_dataLength_(Code)



m_indexLength_
protected int m_indexLength_(Code)



m_index_
protected int m_index_(Code)
Index values at build-time are 32 bits wide for easier processing. Bit 31 is set if the data block is used by multiple index values (from setRange()).



m_isCompacted_
protected boolean m_isCompacted_(Code)



m_isLatin1Linear_
protected boolean m_isLatin1Linear_(Code)



m_map_
protected int m_map_(Code)
Map of adjusted indexes, used in utrie_compact(). Maps from original indexes to new ones.




Constructor Detail
TrieBuilder
protected TrieBuilder()(Code)



TrieBuilder
protected TrieBuilder(TrieBuilder table)(Code)




Method Detail
equal_int
final protected static boolean equal_int(int[] array, int start1, int start2, int length)(Code)
Compare two sections of an array for equality.



findSameIndexBlock
final protected static int findSameIndexBlock(int index, int indexLength, int otherBlock)(Code)
Finds the same index block as the otherBlock
Parameters:
  index - array
Parameters:
  indexLength - size of index
Parameters:
  otherBlock - same index block



findUnusedBlocks
protected void findUnusedBlocks()(Code)
Set a value in the trie index map to indicate which data block is referenced and which one is not. utrie_compact() will remove data blocks that are not used at all. Set - 0 if it is used - -1 if it is not used



isInZeroBlock
public boolean isInZeroBlock(int ch)(Code)
Checks if the character belongs to a zero block in the trie
Parameters:
  ch - codepoint which data is to be retrieved true if ch is in the zero block



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.