umich.cac.queryengine.comparator
Class UserNumNodesComparator
java.lang.Object
umich.cac.queryengine.comparator.UserNumNodesComparator
- All Implemented Interfaces:
- java.util.Comparator
- public final class UserNumNodesComparator
- extends java.lang.Object
- implements java.util.Comparator
Sorts userData by run time instead of it's default ordering.
An example usage would be
TreeSet sortSet = new TreeSet(new UserNumNodesComparator()); sortSet.addAll(collection);
- Version:
- $Header: /cvsroot/pbsaccounting/pbsaccounting/darkslide/doc/javadoc/umich/cac/queryengine/comparator/UserNumNodesComparator.html,v 1.1 2003/12/18 17:16:40 rodmach Exp $
- Author:
- bkirschn@umich.edu
Method Summary |
int |
compare(java.lang.Object o1,
java.lang.Object o2)
Compares sorts UserData objects by comparing job run time |
boolean |
equals(java.lang.Object obj)
Override of equals |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UserNumNodesComparator
public UserNumNodesComparator()
compare
public int compare(java.lang.Object o1,
java.lang.Object o2)
- Compares sorts UserData objects by comparing job run time
- Specified by:
compare
in interface java.util.Comparator
- Parameters:
o1
- Object of type UserDatao2
- Object of type UserData
- Returns:
- a negative integer, zero, or a positive integer if the first
argument's runtime is less than, equal to, or greater than the
second.
equals
public boolean equals(java.lang.Object obj)
- Override of equals
- Specified by:
equals
in interface java.util.Comparator
- Parameters:
obj
- Object of type UserNumNodesComparator
- Returns:
- true if equal, false if not equal