java.lang.Object
openfuture.bugbase.model.BugReportDateComparator
openfuture.bugbase.model.BugReportStatusComparator
- All Implemented Interfaces:
- java.util.Comparator
- public class BugReportStatusComparator
- extends BugReportDateComparator
- implements java.util.Comparator
Compares two bug reports by
their rejecting date 55 If these are equal,
their fixing date 55 is used for comparison. If these are also equal,
starting date 55 is used for comparison. If these are also equal,
their reported date 55 . If they are equal,
their ID 55 is used.
Created: Mon Apr 03 20:31:26 2000
- Version:
- $Revision: 1.3 $
Method Summary |
int |
compare(java.lang.Object o1,
java.lang.Object o2)
Return an integer that is negative, zero or positive depending on whether
the first argument is less than, equal to or greater than the second
according to this ordering. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BugReportStatusComparator
public BugReportStatusComparator()
compare
public int compare(java.lang.Object o1,
java.lang.Object o2)
- Description copied from interface:
java.util.Comparator
- Return an integer that is negative, zero or positive depending on whether
the first argument is less than, equal to or greater than the second
according to this ordering. This method should obey the following
contract:
- if compare(a, b) < 0 then compare(b, a) > 0
- if compare(a, b) throws an exception, so does compare(b, a)
- if compare(a, b) < 0 and compare(b, c) < 0 then compare(a, c)
< 0
- if compare(a, b) == 0 then compare(a, c) and compare(b, c) must
have the same sign
To be consistent with equals, the following additional constraint is
in place:
- if a.equals(b) or both a and b are null, then
compare(a, b) == 0.
Although it is permissible for a comparator to provide an order
inconsistent with equals, that should be documented.
- Specified by:
compare
in interface java.util.Comparator
- Overrides:
compare
in class BugReportDateComparator