12 lines
267 B
Java
12 lines
267 B
Java
|
public class StringComparator implements TreeComparator<String> {
|
||
|
|
||
|
@Override
|
||
|
public int compare(String a, String b) {
|
||
|
int comparing = a.compareTo(b);
|
||
|
|
||
|
if (comparing == 0) return 0;
|
||
|
return comparing /= Math.abs(comparing);
|
||
|
}
|
||
|
|
||
|
}
|