edu.jhu.tmaj.util.data
Class DefaultComparator
java.lang.Object
edu.jhu.tmaj.util.data.DefaultComparator
- All Implemented Interfaces:
- java.util.Comparator
public final class DefaultComparator
- extends java.lang.Object
- implements java.util.Comparator
This class should be unnecessary. It was made to trick eclipse as it was giving us an error
whenever something this was written:
List thingList=new ArrayList();
Collection.sort(thingList);
Instead, write this:
Collections.sort(thingList, new DefaultComparator());
Method Summary |
int |
compare(java.lang.Object arg0,
java.lang.Object arg1)
|
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 |
DefaultComparator
public DefaultComparator()
compare
public int compare(java.lang.Object arg0,
java.lang.Object arg1)
- Specified by:
compare
in interface java.util.Comparator