@Test public void compare_differentTrees() { assertThat(comparator.compare("cn=a,cn=root", "cn=b,cn=root"), is(more())); assertThat(comparator.compare("cn=b,cn=root", "cn=a,cn=root"), is(less())); }
@Override public int compare(String o1, String o2) { return (reverse ? -1 : 1) * StringUtils.reverse(o1).compareTo(StringUtils.reverse(o2)); }
DnComparator implements Comparator<String> { @Override public int compare(String o1, String o2) { return (reverse ? -1 : 1) * StringUtils.reverse(o1).compareTo(StringUtils.reverse(o2)); } }
DnComparator implements Comparator<String> { @Override public int compare(String o1, String o2) { return (reverse ? -1 : 1) * StringUtils.reverse(o1).compareTo(StringUtils.reverse(o2)); } DnComparator(boolean reverse); }
DnComparator implements Comparator<String> { @Override public int compare(String o1, String o2) { return (reverse ? -1 : 1) * StringUtils.reverse(o1).compareTo(StringUtils.reverse(o2)); } DnComparator(boolean reverse); @Override int compare(String o1, String o2); }
DnComparator implements Comparator<String> { @Override public int compare(String o1, String o2) { return (reverse ? -1 : 1) * StringUtils.reverse(o1).compareTo(StringUtils.reverse(o2)); } DnComparator(boolean reverse); @Override int compare(String o1, String o2);  }