@Test public void testLengthIsEqualAndStringsAreEqual() { String oneString = "\u0938\u0924"; String twoString = "\u0938\u0924"; int result = new IndicCompositeCharacterComparator().compare(oneString, twoString); assertTrue("expected to be equal", result == 0); }
public int compare(String o1, String o2) { if (o1.length() < o2.length()) { return 1; } if (o1.length() > o2.length()) { return -1; } return o1.compareTo(o2); }
IndicCompositeCharacterComparator implements Comparator<String> { public int compare(String o1, String o2) { if (o1.length() < o2.length()) { return 1; } if (o1.length() > o2.length()) { return -1; } return o1.compareTo(o2); } }
IndicCompositeCharacterComparator implements Comparator<String> { public int compare(String o1, String o2) { if (o1.length() < o2.length()) { return 1; } if (o1.length() > o2.length()) { return -1; } return o1.compareTo(o2); }  }
IndicCompositeCharacterComparator implements Comparator<String> { public int compare(String o1, String o2) { if (o1.length() < o2.length()) { return 1; } if (o1.length() > o2.length()) { return -1; } return o1.compareTo(o2); }  int compare(String o1, String o2); }
IndicCompositeCharacterComparator implements Comparator<String> { public int compare(String o1, String o2) { if (o1.length() < o2.length()) { return 1; } if (o1.length() > o2.length()) { return -1; } return o1.compareTo(o2); }  int compare(String o1, String o2);  }