org.eclipse.core.commands.common
Class NamedHandleObjectComparator
java.lang.Object
org.eclipse.core.commands.common.NamedHandleObjectComparator
- All Implemented Interfaces:
- Comparator
- public class NamedHandleObjectComparator
- extends Object
- implements Comparator
Comparator for instances of NamedHandleObject for display to
* an end user. The comparison is based on the name of the instances.
*
* @since 3.2
|
Method Summary |
int |
compare(Object left,
Object right)
Compares to instances of NamedHandleObject based on their names. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NamedHandleObjectComparator
public NamedHandleObjectComparator()
compare
public final int compare(Object left,
Object right)
- Compares to instances of NamedHandleObject based on their names. This is
* useful is they are display to an end user.
*
* @param left
* The first obect to compare; may be
null.
* @param right
* The second object to compare; may be null.
* @return -1 if left is null
* and right is not null;
* 0 if they are both null;
* 1 if left is not null
* and right is null. Otherwise, the
* result of left.compareTo(right).
- Specified by:
compare in interface Comparator
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2007. All rights reserved.