protected int copyContractionsFromBaseCE32(StringBuilder context, int c, int ce32,
            ConditionalCE32 cond) {
        int trieIndex = Collation.indexFromCE32(ce32);
        int index;
        if((ce32 & Collation.CONTRACT_SINGLE_CP_NO_MATCH) != 0) {
            // No match on the single code point.
            // We are underneath a prefix, and the default mapping is just
            // a fallback to the mappings for a shorter prefix.
            assert(context.length() > 1);
            index = -1;
        } else {
            ce32 = base.getCE32FromContexts(trieIndex);  // Default if no suffix match.
            assert(!Collation.isContractionCE32(ce32));
            ce32 = copyFromBaseCE32(c, ce32, true);
            cond.next = index = addConditionalCE32(context.toString(), ce32);
            cond = getConditionalCE32(index);
        }

        int suffixStart = context.length();
        CharsTrie.Iterator suffixes = CharsTrie.iterator(base.contexts, trieIndex + 2, 0);
        while(suffixes.hasNext()) {
            CharsTrie.Entry entry = suffixes.next();
            context.append(entry.chars);
            ce32 = copyFromBaseCE32(c, entry.value, true);
            cond.next = index = addConditionalCE32(context.toString(), ce32);
            // No need to update the unsafeBackwardSet because the tailoring set
            // is already a copy of the base set.
            cond = getConditionalCE32(index);
            context.setLength(suffixStart);
        }
        assert(index >= 0);
        return index;
    }
protected int copyContractionsFromBaseCE32 ( StringBuilder context , int c , int ce32 , ConditionalCE32 cond ) { int trieIndex = Collation . indexFromCE32 ( ce32 ) ; int index ; if ( ( ce32 & Collation . CONTRACT_SINGLE_CP_NO_MATCH ) != 0 ) { assert ( context . length ( ) > 1 ) ; index = - 1 ; } else { ce32 = base . getCE32FromContexts ( trieIndex ) ; assert ( ! Collation . isContractionCE32 ( ce32 ) ) ; ce32 = copyFromBaseCE32 ( c , ce32 , true ) ; cond . next = index = addConditionalCE32 ( context . toString ( ) , ce32 ) ; cond = getConditionalCE32 ( index ) ; } int suffixStart = context . length ( ) ; CharsTrie . Iterator suffixes = CharsTrie . iterator ( base . contexts , trieIndex + 2 , 0 ) ; while ( suffixes . hasNext ( ) ) { CharsTrie . Entry entry = suffixes . next ( ) ; context . append ( entry . chars ) ; ce32 = copyFromBaseCE32 ( c , entry . value , true ) ; cond . next = index = addConditionalCE32 ( context . toString ( ) , ce32 ) ; cond = getConditionalCE32 ( index ) ; context . setLength ( suffixStart ) ; } assert ( index >= 0 ) ; return index ; }
Copies base contractions to a list of ConditionalCE32.
Sets cond.next to the index of the first new item
and returns the index of the last new item.