org.acmsl.antmake
Class CvsUtils.DateComparator

java.lang.Object
  |
  +--org.acmsl.antmake.CvsUtils.DateComparator
All Implemented Interfaces:
java.util.Comparator
Enclosing class:
CvsUtils

public static class CvsUtils.DateComparator
extends java.lang.Object
implements java.util.Comparator

Sorts CVS entries by date.

Version:
$Revision: $
Author:
Jose San Leandro

Constructor Summary
CvsUtils.DateComparator()
           
 
Method Summary
 int compare(CvsEntry first, CvsEntry second)
          Compares given CVS entries by their date.
 int compare(java.lang.Object first, java.lang.Object second)
          Compares its two arguments for order.
 boolean equals(java.lang.Object comparator)
          Checks if given comparator is semantically equal to this instance.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CvsUtils.DateComparator

public CvsUtils.DateComparator()
Method Detail

compare

public int compare(java.lang.Object first,
                   java.lang.Object second)
            throws java.lang.ClassCastException
Compares its two arguments for order.

Specified by:
compare in interface java.util.Comparator
Parameters:
first - the first entry.
second - the second entry.
Returns:
a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
Throws:
java.lang.ClassCastException - if the arguments' types prevent them from being compared by this Comparator.

compare

public int compare(CvsEntry first,
                   CvsEntry second)
Compares given CVS entries by their date.

Parameters:
first - the first entry.
second - the second entry.
Returns:
a negative integer or a positive integer depending on whether the first entry is before or after the second.

equals

public boolean equals(java.lang.Object comparator)
Checks if given comparator is semantically equal to this instance.

Specified by:
equals in interface java.util.Comparator
Overrides:
equals in class java.lang.Object
Parameters:
comparator - the comparator to check against.
Returns:
true if both instances are semantically equal.


Copyright © 2004 ACM S.L.. All Rights Reserved.