Rev | Line | |
---|
[1573] | 1 | // Comparator.java |
---|
| 2 | // |
---|
| 3 | // (c) 1999-2001 PAL Development Core Team |
---|
| 4 | // |
---|
| 5 | // This package may be distributed under the |
---|
| 6 | // terms of the Lesser GNU General Public License (LGPL) |
---|
| 7 | |
---|
| 8 | package de.ugoe.cs.autoquest.tasktrees.alignment.pal.util; |
---|
| 9 | |
---|
| 10 | /** |
---|
| 11 | * interface for an object that can compare other objects for the |
---|
| 12 | * purposes of ordering them. |
---|
| 13 | * This interface is analogous to the Comparator interface in |
---|
| 14 | * Java 1.2 and higher, and it should be superceded by the collections |
---|
| 15 | * framework when PAL is moved to 1.2 or higher. |
---|
| 16 | * |
---|
| 17 | * @version $Id: Comparator.java,v 1.2 2001/07/13 14:39:13 korbinian Exp $ |
---|
| 18 | * |
---|
| 19 | * @author Alexei Drummond |
---|
| 20 | */ |
---|
| 21 | public interface Comparator |
---|
| 22 | { |
---|
| 23 | /** |
---|
| 24 | * Returns a number representing the ordering relationship that |
---|
| 25 | * the two objects have. |
---|
| 26 | * A negative number indicates that the first object is "smaller" than |
---|
| 27 | * the second object, a positive number means it is "larger" and zero |
---|
| 28 | * indicates that the objects are equal. |
---|
| 29 | */ |
---|
| 30 | int compare(Object o1, Object o2); |
---|
| 31 | |
---|
| 32 | /** |
---|
| 33 | * Returns true if the two objects are equal. |
---|
| 34 | */ |
---|
| 35 | boolean equals(Object o1, Object o2); |
---|
| 36 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.