Package com.ibm.wala.util.collections
Class ToStringComparator<T>
- java.lang.Object
-
- com.ibm.wala.util.collections.ToStringComparator<T>
-
- All Implemented Interfaces:
Comparator<T>
public class ToStringComparator<T> extends Object implements Comparator<T>
A comparator based on lexicographical ordering of toString()
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(T o1, T o2)
static <T> ToStringComparator<T>
instance()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Method Detail
-
compare
public int compare(T o1, T o2) throws NullPointerException
- Specified by:
compare
in interfaceComparator<T>
- Throws:
NullPointerException
-
instance
public static <T> ToStringComparator<T> instance()
-
-