Package org.eclipse.graphiti.ui.internal.util

# Class ModelElementNameComparator

java.lang.Object
org.eclipse.graphiti.ui.internal.util.ModelElementNameComparator

All Implemented Interfaces:
  `Comparator<org.eclipse.emf.ecore.ENamedElement>`

public final class ModelElementNameComparator extends Object implements Comparator<org.eclipse.emf.ecore.ENamedElement>
Compares `EMF model elements` by their `name`

## Field Summary

Fields
Modifier and Type
Field
Description
`static final Comparator<org.eclipse.emf.ecore.ENamedElement>`
`INSTANCE`
A comparator comparing case-sensitively
`static final Comparator<org.eclipse.emf.ecore.ENamedElement>`
`INSTANCE_IGNORING_CASE`
A comparator comparing case-insensitively, i.e.

## Method Summary

Modifier and Type
Method
Description
`int`
`compare(org.eclipse.emf.ecore.ENamedElement o1, org.eclipse.emf.ecore.ENamedElement o2)`
`String`
`toString()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface java.util.Comparator

`equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong`

## Field Details

### INSTANCE

public static final Comparator<org.eclipse.emf.ecore.ENamedElement> INSTANCE
A comparator comparing case-sensitively

### INSTANCE_IGNORING_CASE

public static final Comparator<org.eclipse.emf.ecore.ENamedElement> INSTANCE_IGNORING_CASE
A comparator comparing case-insensitively, i.e. ignoring case

## Method Details

### compare

public int compare(org.eclipse.emf.ecore.ENamedElement o1, org.eclipse.emf.ecore.ENamedElement o2)

Specified by:
  `compare` in interface `Comparator<org.eclipse.emf.ecore.ENamedElement>`
See Also:
  - `Comparator.compare(Object, Object)`

### toString

public String toString()

Overrides:
  `toString` in class `Object`