org.hackystat.utilities.tstamp
Class TstampComparator

java.lang.Object
  extended by org.hackystat.utilities.tstamp.TstampComparator
All Implemented Interfaces:
java.io.Serializable, java.util.Comparator<javax.xml.datatype.XMLGregorianCalendar>

public class TstampComparator
extends java.lang.Object
implements java.io.Serializable, java.util.Comparator<javax.xml.datatype.XMLGregorianCalendar>

Implements a comparator for XMLGregorianCalendar instances consistent with the Tstamp operations.

Author:
Philip Johnson
See Also:
Serialized Form

Constructor Summary
TstampComparator()
           
 
Method Summary
 int compare(javax.xml.datatype.XMLGregorianCalendar tstamp1, javax.xml.datatype.XMLGregorianCalendar tstamp2)
          Compares the two instances.
 
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
 

Constructor Detail

TstampComparator

public TstampComparator()
Method Detail

compare

public int compare(javax.xml.datatype.XMLGregorianCalendar tstamp1,
                   javax.xml.datatype.XMLGregorianCalendar tstamp2)
Compares the two instances.

Specified by:
compare in interface java.util.Comparator<javax.xml.datatype.XMLGregorianCalendar>
Parameters:
tstamp1 - The first tstamp.
tstamp2 - The second tstamp.
Returns:
-1, 0, or +1 depending.