1 11 12 package org.eclipse.core.commands.common; 13 14 import java.util.Comparator ; 15 16 import org.eclipse.core.internal.commands.util.Util; 17 18 24 public class NamedHandleObjectComparator implements Comparator { 25 26 41 public final int compare(final Object left, final Object right) { 42 final NamedHandleObject a = (NamedHandleObject) left; 43 final NamedHandleObject b = (NamedHandleObject) right; 44 45 String aName = null; 46 try { 47 aName = a.getName(); 48 } catch (final NotDefinedException e) { 49 } 51 String bName = null; 52 try { 53 bName = b.getName(); 54 } catch (final NotDefinedException e) { 55 } 57 58 return Util.compare(aName, bName); 59 } 60 } 61 | Popular Tags |