umich.cac.queryengine.comparator
Class UserWallClockComparator

java.lang.Object
  extended byumich.cac.queryengine.comparator.UserWallClockComparator
All Implemented Interfaces:
java.util.Comparator

public final class UserWallClockComparator
extends java.lang.Object
implements java.util.Comparator

Sorts UserData by wall clock time instead of it's natural ordering by implementing the Comparator interface.

An example usage would be

  TreeSet sortSet = new TreeSet(new UserWallClockComparator()); sortSet.addAll(collection);
  

Version:
$Header: /cvsroot/pbsaccounting/pbsaccounting/darkslide/doc/javadoc/umich/cac/queryengine/comparator/UserWallClockComparator.html,v 1.3 2003/12/18 17:16:40 rodmach Exp $
Author:
rmach@umich.edu

Constructor Summary
UserWallClockComparator()
           
 
Method Summary
 int compare(java.lang.Object o1, java.lang.Object o2)
          Compares sorts UserData objects by comparing the wall clock times.
 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
 

Constructor Detail

UserWallClockComparator

public UserWallClockComparator()
Method Detail

compare

public int compare(java.lang.Object o1,
                   java.lang.Object o2)
Compares sorts UserData objects by comparing the wall clock times.

Specified by:
compare in interface java.util.Comparator
Parameters:
o1 - Object of type UserData
o2 - Object of type UserData
Returns:
a negative integer, zero, or a positive integer as the first argument's wall clock 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 UserWallClockComparator
Returns:
true if equal, false if not equal