org.infai.emo.matcher.impl
Class MetaClassComparator

java.lang.Object
  extended by org.infai.emo.matcher.Comparator
      extended by org.infai.emo.matcher.ElementComparator
          extended by org.infai.emo.matcher.impl.MetaClassComparator

public class MetaClassComparator
extends ElementComparator

Comparator for comparing two elements by testing their metaClasses on equality.

Version:
1.0.0
Author:
Stanley Hillner
See Also:
ElementComparator

Constructor Summary
MetaClassComparator()
           
 
Method Summary
 double compareTo(org.eclipse.emf.ecore.EObject leftElement, org.eclipse.emf.ecore.EObject rightElement)
          Method compares the metaClass-types of both elements.
 
Methods inherited from class org.infai.emo.matcher.Comparator
getName, setName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MetaClassComparator

public MetaClassComparator()
Method Detail

compareTo

public double compareTo(org.eclipse.emf.ecore.EObject leftElement,
                        org.eclipse.emf.ecore.EObject rightElement)
Method compares the metaClass-types of both elements.

Specified by:
compareTo in class Comparator
Parameters:
leftElement - the first element to compare with the second one.
rightElement - the second element to compare with the first one.
Returns:
1.0 if the metaClasses of both elements are of the same type.
If not, the Method returns 0.0.
See Also:
EObject