public class ToStringComparator<T>
extends java.lang.Object
implements java.util.Comparator<T>
Constructor and Description |
---|
ToStringComparator() |
Modifier and Type | Method and Description |
---|---|
int |
compare(T o1,
T o2)
Compares the strings returned from each Object's "toString()" method lexicographically
using the String.compareTo() method.
|
public int compare(T o1, T o2)
compare
in interface java.util.Comparator<T>
o1
- - the first object to be compared.o2
- - the second object to be compared.