static int ceiNext (CollationElementIterator cei)
int ceiNext (CollationElementIterator cei)
  static int ceiNext (CollationElementIterator cei)  {    if (cei.lookahead_set)      {	cei.lookahead_set = false;	return cei.lookahead;      }    int save = cei.index;    int max = cei.text.length();    String s = null;    // It is possible to have a case where `abc' has a mapping, but    // neither `ab' nor `abd' do.  In this case we must treat `abd' as    // nothing special.    boolean found = false;    int i;    for (i = save; i < max; ++i)      {	s = cei.text.substring(save, i);	if (prefixes.get(s) == null)	  break;	found = true;      }    // Assume s != null.    Object obj = map.get(s);    // The special case.    while (found && obj == null && s.length() > 1)      {	--i;	s = cei.text.substring(save, i);	obj = map.get(s);      }    // Update state.    cei.index = i;    if (obj == null)      {	// This idea, and the values, come from JDK.	// assert (s.length() == 1)	cei.lookahead_set = true;	cei.lookahead = s.charAt(0) << 8;	return 0x7fff << 16;      }    return ((Integer) obj).intValue();  }