dea.common
Class ReverseDateComparator

java.lang.Object
  extended bydea.common.ReverseDateComparator
All Implemented Interfaces:
java.util.Comparator

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

Title: Reverse Date Comparator.
Description: Compator for sorting a TreeMap of date keyed objects in descending order.
Copyright: Copyright (c) 2004
Company: RMRR

@author David Abigt
@version 1.0


Constructor Summary
ReverseDateComparator()
           
 
Method Summary
 int compare(java.lang.Object obja, java.lang.Object objb)
          Compares millisecs of 2 date objects
 
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

ReverseDateComparator

public ReverseDateComparator()
Method Detail

compare

public int compare(java.lang.Object obja,
                   java.lang.Object objb)
Compares millisecs of 2 date objects

Specified by:
compare in interface java.util.Comparator
Parameters:
obja - first date to compare
objb - second date to compare
Returns:
a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second. If either obj is null it is considered the smaller.
Throws:
java.lang.ClassCastException - the arguments cannot be cast to Dates.


Copyright © 2001-2005 Round Mountain Rescue Ranch. All Rights Reserved.