openfuture.bugbase.model
Class BugReportIdComparator

java.lang.Object
  |
  +--openfuture.bugbase.model.BugReportIdComparator
All Implemented Interfaces:
java.util.Comparator

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

Compares two bug reports by their ID.

Created: Fri Mar 09 06:27:29 2001

Version:
$Revision: 1.3 $
Author:
Wolfgang Reissenberger

Constructor Summary
BugReportIdComparator()
           
 
Method Summary
 int compare(java.lang.Object o1, java.lang.Object o2)
          Compare two objects.
static int compareId(java.lang.Integer id1, java.lang.Integer id2)
          Compare two integers (possibly null).
 
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

BugReportIdComparator

public BugReportIdComparator()
Method Detail

compare

public int compare(java.lang.Object o1,
                   java.lang.Object o2)
Compare two objects. If o1 and o1 are bug reports, their ID is compared.
Specified by:
compare in interface java.util.Comparator
Parameters:
o1 - a value of type 'Object'
o2 - a value of type 'Object'
Returns:
-1 if o1 is smaller, 1 if o1 is greater and 0 of o1 is equal to o2.

compareId

public static int compareId(java.lang.Integer id1,
                            java.lang.Integer id2)
Compare two integers (possibly null).
Parameters:
id1 - a value of type 'Integer'
id2 - a value of type 'Integer'
Returns:
a value of type 'int'


Copyright © 2000 -- 2003 openfuture.de. All Rights Reserved.