int factor = 1; if (lang1.charAt(lang1.length()-1) != '%'){ lang1 = b.getLang1(); lang2 = a.getLang1(); factor = -1; } System.out.print(lang1+" "+lang2+" "); lang1 = lang1.substring(0, lang1.length()-1); int reduction = lang1.length() < lang2.length() ? lang1.length() : lang2.length();  String temp1 = lang1; String temp2 = lang2.substring(0, reduction); System.out.println(temp1+" "+temp2+" "+factor); return factor * temp1.compareToIgnoreCase(temp2);
return lang1.compareToIgnoreCase(lang2);
    public int compare(TableRow a, TableRow b){                String lang1 = a.getLang1();        String lang2 = b.getLang1();                if (lang1 == null)            return -1;        if (lang2 == null)            return 1;        int factor = 1;        if (lang1.charAt(lang1.length()-1) != '%'){            lang1 = b.getLang1();            lang2 = a.getLang1();            factor = -1;        }        System.out.print(lang1+" "+lang2+" ");        lang1 = lang1.substring(0, lang1.length()-1);        int reduction = lang1.length() < lang2.length() ? lang1.length() : lang2.length();        String temp1 = lang1;        String temp2 = lang2.substring(0, reduction);        System.out.println(temp1+" "+temp2+" "+factor);        return factor * temp1.compareToIgnoreCase(temp2);            }   