class EObjectNameComparator implements Comparator<T>, Serializable {

	@Override
	public int compare(T arg0, T arg1) {
		if(arg0==null)
			return 1;
		EStructuralFeature feature1 = arg0.eClass().getEStructuralFeature(featureName);
		String n1 = (String) (feature1 != null ? arg0.eGet(feature1) : arg0.toString());
		EStructuralFeature feature2 = arg0.eClass().getEStructuralFeature(featureName);
		String n2 = (String) (feature2 != null ? arg1.eGet(feature2) : arg1.toString());
		if(n1==null && n2==null)
			return 0;
		if(n1==null)
			return 1;
		if(n2==null)
			return -1;
		return COLLATOR.compare(n1, n2);
	}

	public  EObjectNameComparator();
	public  EObjectNameComparator(String featureName);

}