Package com.ibm.icu.impl

Examples of com.ibm.icu.impl.IntTrieBuilder


      m_expansions_ = new ArrayList<Integer>();
      // Do your own mallocs for the structure, array and have linear
      // Latin 1
      int trieinitialvalue = RuleBasedCollator.CE_SPECIAL_FLAG_ | (CE_NOT_FOUND_TAG_ << 24);
      // temporary fix for jb3822, 0x100000 -> 30000
      m_mapping_ = new IntTrieBuilder(null, 0x30000, trieinitialvalue, trieinitialvalue, true);
      m_prefixLookup_ = new HashMap<Elements, Elements>();
      // uhash_open(prefixLookupHash, prefixLookupComp);
      m_contractions_ = new ContractionTable(m_mapping_);
      // copy UCA's maxexpansion and merge as we go along
      m_maxExpansions_ = maxet;
View Full Code Here


     * @param table
     *            to clone
     */
    BuildTable(final BuildTable table) {
      m_collator_ = table.m_collator_;
      m_mapping_ = new IntTrieBuilder(table.m_mapping_);
      m_expansions_ = new ArrayList<Integer>(table.m_expansions_);
      m_contractions_ = new ContractionTable(table.m_contractions_);
      m_contractions_.m_mapping_ = m_mapping_;
      m_options_ = table.m_options_;
      m_maxExpansions_ = new MaxExpansionTable(table.m_maxExpansions_);
View Full Code Here

     *            build table
     * @param collator
     *            to update
     */
    private void assembleTable(BuildTable t, RuleBasedCollator collator) {
        IntTrieBuilder mapping = t.m_mapping_;
        Vector<Integer> expansions = t.m_expansions_;
        ContractionTable contractions = t.m_contractions_;
        MaxExpansionTable maxexpansion = t.m_maxExpansions_;

        // contraction offset has to be in since we are building on the
        // UCA contractions
        // int beforeContractions = (HEADER_SIZE_
        // + paddedsize(expansions.size() << 2)) >>> 1;
        collator.m_contractionOffset_ = 0;
        int contractionsSize = constructTable(contractions);

        // the following operation depends on the trie data. Therefore, we have
        // to do it before the trie is compacted
        // sets jamo expansions
        getMaxExpansionJamo(mapping, maxexpansion, t.m_maxJamoExpansions_,
                collator.m_isJamoSpecial_);

        // TODO: LATIN1 array is now in the utrie - it should be removed from
        // the calculation
        setAttributes(collator, t.m_options_);
        // copy expansions
        int size = expansions.size();
        collator.m_expansion_ = new int[size];
        for (int i = 0; i < size; i++) {
            collator.m_expansion_[i] = expansions.get(i).intValue();
        }
        // contractions block
        if (contractionsSize != 0) {
            // copy contraction index
            collator.m_contractionIndex_ = new char[contractionsSize];
            contractions.m_codePoints_.getChars(0, contractionsSize,
                    collator.m_contractionIndex_, 0);
            // copy contraction collation elements
            collator.m_contractionCE_ = new int[contractionsSize];
            for (int i = 0; i < contractionsSize; i++) {
                collator.m_contractionCE_[i] = contractions.m_CEs_.get(i).intValue();
            }
        }
        // copy mapping table
        collator.m_trie_ = mapping.serialize(t,
                RuleBasedCollator.DataManipulate.getInstance());
        // copy max expansion table
        // not copying the first element which is a dummy
        // to be in synch with icu4c's builder, we continue to use the
        // expansion offset
View Full Code Here

            // Do your own mallocs for the structure, array and have linear
            // Latin 1
            int trieinitialvalue = RuleBasedCollator.CE_SPECIAL_FLAG_
                    | (CE_NOT_FOUND_TAG_ << 24);
            // temporary fix for jb3822, 0x100000 -> 30000
            m_mapping_ = new IntTrieBuilder(null, 0x30000, trieinitialvalue,
                    trieinitialvalue, true);
            m_prefixLookup_ = new Hashtable<Elements, Elements>();
            // uhash_open(prefixLookupHash, prefixLookupComp);
            m_contractions_ = new ContractionTable(m_mapping_);
            // copy UCA's maxexpansion and merge as we go along
View Full Code Here

         * @param table
         *            to clone
         */
        BuildTable(BuildTable table) {
            m_collator_ = table.m_collator_;
            m_mapping_ = new IntTrieBuilder(table.m_mapping_);
            m_expansions_ = new Vector<Integer>(table.m_expansions_);
            m_contractions_ = new ContractionTable(table.m_contractions_);
            m_contractions_.m_mapping_ = m_mapping_;
            m_options_ = table.m_options_;
            m_maxExpansions_ = new MaxExpansionTable(table.m_maxExpansions_);
View Full Code Here

        //IntTrieBuilder(int aliasdata[], int maxdatalength,
        //        int initialvalue, int leadunitvalue,
        //        boolean latin1linear)
       
        fTrie = new IntTrieBuilder(null,   //   Data array  (utrie will allocate one)
                                   100000//   Max Data Length
                                   0,       //   Initial value for all code points
                                   0,       //   Lead Surrogate unit value,
                                   true);   //   Keep Latin 1 in separately.
       
View Full Code Here

TOP

Related Classes of com.ibm.icu.impl.IntTrieBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.