Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 8d4ad9d40c696445b2ddf175177d702da2717263 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*****************************************************************************
 * Copyright (c) 2015 CEA LIST and others.
 * 
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *   CEA LIST - Initial API and implementation
 *   
 *****************************************************************************/
package org.eclipse.papyrus.uml.diagram.dnd.smart.graph.model;

import java.util.Comparator;

import org.eclipse.emf.ecore.EClass;

/**
 * Comparator of two ECLass
 * @author flefevre
 *
 */
public class EClassComparator implements Comparator<EClass>{

	public int compare(EClass e1, EClass e2) {
		if(e1.getName()!=null){
			return e1.getName().compareTo(e2.getName());
		}
		else{
			return -1;
		}
	}
}

Back to the top