private void addComposedChars() throws ParseException {
  ComposedCharIter iter=new ComposedCharIter();
  int c;
  while ((c=iter.next()) != ComposedCharIter.DONE) {
    if (getCharOrder(c) == RBCollationTables.UNMAPPED) {
      String s=iter.decomposition();
      if (s.length() == 1) {
        int order=getCharOrder(s.charAt(0));
        if (order != RBCollationTables.UNMAPPED) {
          addOrder(c,order);
        }
        continue;
      }
 else       if (s.length() == 2) {
        char ch0=s.charAt(0);
        if (Character.isHighSurrogate(ch0)) {
          int order=getCharOrder(s.codePointAt(0));
          if (order != RBCollationTables.UNMAPPED) {
            addOrder(c,order);
          }
          continue;
        }
      }
      int contractOrder=getContractOrder(s);
      if (contractOrder != RBCollationTables.UNMAPPED) {
        addOrder(c,contractOrder);
      }
 else {
        boolean allThere=true;
        for (int i=0; i < s.length(); i++) {
          if (getCharOrder(s.charAt(i)) == RBCollationTables.UNMAPPED) {
            allThere=false;
            break;
          }
        }
        if (allThere) {
          addExpandOrder(c,s,RBCollationTables.UNMAPPED);
        }
      }
    }
  }
}

private void addComposedChars ( ) throws ParseException { ComposedCharIter iter = new ComposedCharIter ( ) ; int c ; while ( ( c = iter . next ( ) ) != ComposedCharIter . DONE ) { if ( getCharOrder ( c ) == RBCollationTables . UNMAPPED ) { String s = iter . decomposition ( ) ; if ( s . length ( ) == 1 ) { int order = getCharOrder ( s . charAt ( 0 ) ) ; if ( order != RBCollationTables . UNMAPPED ) { addOrder ( c , order ) ; } continue ; } else if ( s . length ( ) == 2 ) { char ch0 = s . charAt ( 0 ) ; if ( Character . isHighSurrogate ( ch0 ) ) { int order = getCharOrder ( s . codePointAt ( 0 ) ) ; if ( order != RBCollationTables . UNMAPPED ) { addOrder ( c , order ) ; } continue ; } } int contractOrder = getContractOrder ( s ) ; if ( contractOrder != RBCollationTables . UNMAPPED ) { addOrder ( c , contractOrder ) ; } else { boolean allThere = true ; for ( int i = 0 ; i < s . length ( ) ; i ++ ) { if ( getCharOrder ( s . charAt ( i ) ) == RBCollationTables . UNMAPPED ) { allThere = false ; break ; } } if ( allThere ) { addExpandOrder ( c , s , RBCollationTables . UNMAPPED ) ; } } } } }
add expanding entries for pre - composed unicode characters so that this collator can be used reasonably well with decomposition turned off .
