Package org.eclipse.core.commands.common
Class NamedHandleObjectComparator
- java.lang.Object
-
- org.eclipse.core.commands.common.NamedHandleObjectComparator
-
- All Implemented Interfaces:
java.util.Comparator
public class NamedHandleObjectComparator extends java.lang.Object implements java.util.ComparatorComparator for instances ofNamedHandleObjectfor display to an end user. The comparison is based on the name of the instances.- Since:
- 3.2
-
-
Constructor Summary
Constructors Constructor Description NamedHandleObjectComparator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(java.lang.Object left, java.lang.Object right)Compares to instances of NamedHandleObject based on their names.
-
-
-
Method Detail
-
compare
public final int compare(java.lang.Object left, java.lang.Object right)Compares to instances of NamedHandleObject based on their names. This is useful is they are display to an end user.- Specified by:
comparein interfacejava.util.Comparator- Parameters:
left- The first obect to compare; may benull.right- The second object to compare; may benull.- Returns:
-1ifleftisnullandrightis notnull;0if they are bothnull;1ifleftis notnullandrightisnull. Otherwise, the result ofleft.compareTo(right).
-
-