{  String comp1 = UnicodeHelpers.glyphToUnicode(entry1.compareProcessed); String comp2 = UnicodeHelpers.glyphToUnicode(entry2.compareProcessed);   int minCount = Math.min(comp1.length(), comp2.length()); int z = 0; while(z < minCount) { char ch1 = comp1.charAt(z); char ch2 = comp2.charAt(z);  int result = compareChar(ch1, ch2);  if(result < 0) { return -1; } else if(result > 0) { return 1; }  z++; }     if(comp1.length() < comp2.length()) { return -1; } else if(comp1.length() > comp2.length()) { return 1; }    return 0;
{ if(coll != null) { return entry1.collationKey.compareTo(entry2.collationKey); } else { return compareManually(entry1, entry2); }
  public int compare(Entry entry1, Entry entry2)  {            // this will become the comparation strings      String comp1 = UnicodeHelpers.glyphToUnicode(entry1.compareProcessed);      String comp2 = UnicodeHelpers.glyphToUnicode(entry2.compareProcessed);            // go through every char-position      int minCount = Math.min(comp1.length(), comp2.length());      int z = 0;      while(z < minCount)      {        char ch1 = comp1.charAt(z);        char ch2 = comp2.charAt(z);               int result = compareChar(ch1, ch2);               if(result < 0)        {          return -1;                      }        else if(result > 0)        {          return 1;        }                 z++;                }            // both seem to be equal up to the minimal length      // --> decide after the length            if(comp1.length() < comp2.length())      {        return -1;      }      else if(comp1.length() > comp2.length())      {        return 1;               }            // the strings are absoutely equal            return 0;  }