org.exolab.jms.persistence
Class DateTimeComparator

java.lang.Object
  |
  +--org.exolab.jms.persistence.DateTimeComparator
All Implemented Interfaces:
java.util.Comparator

public class DateTimeComparator
extends java.lang.Object
implements java.util.Comparator

A comparator class that iplements a date/time comparison for PersistentMessage

Version:
$Revision: 1.4 $ $Date: 2003/08/17 01:32:25 $
Author:
Jim Mourikis

Constructor Summary
DateTimeComparator()
          Default constructor does nothing.
 
Method Summary
 int compare(java.lang.Object o1, java.lang.Object o2)
          Implements the compare operator.
 boolean equals(java.lang.Object ob)
          Indicates whether some other object is "equal to" this Comparator.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateTimeComparator

public DateTimeComparator()
Default constructor does nothing.
Method Detail

compare

public int compare(java.lang.Object o1,
                   java.lang.Object o2)
            throws java.lang.ClassCastException
Implements the compare operator. Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
Specified by:
compare in interface java.util.Comparator
Parameters:
Object - object 1 to compare
Object - object 2 ro compare to.
Returns:
int returns -1, 0, 1 if the first argument is less than, equal to, or greater than the second.
Throws:
java.lang.ClassCastException - if object types are unknown

equals

public boolean equals(java.lang.Object ob)
Indicates whether some other object is "equal to" this Comparator. This method must obey the general contract of Object.equals(Object).
Specified by:
equals in interface java.util.Comparator
Overrides:
equals in class java.lang.Object
Parameters:
Object - the object to compare to
Returns:
boolean true iff objects are equal


Copyright © 1999-2004 The OpenJMS Group. All Rights Reserved.