org.infai.emo.matcher.impl
Class AttributeComparator

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

public class AttributeComparator
extends ElementComparator

Class for comparing the attributes of two elements.

Version:
1.1.0
Author:
Stanley Hillner
See Also:
ElementComparator

Constructor Summary
AttributeComparator()
           
 
Method Summary
 double compareTo(org.eclipse.emf.ecore.EObject leftElement, org.eclipse.emf.ecore.EObject rightElement)
          compare the attributes of the given 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

AttributeComparator

public AttributeComparator()
Method Detail

compareTo

public double compareTo(org.eclipse.emf.ecore.EObject leftElement,
                        org.eclipse.emf.ecore.EObject rightElement)
compare the attributes of the given elements.

Specified by:
compareTo in class Comparator
Parameters:
leftElement - the left element to compare the attributes of
rightElement - the right element for the attribute-comparison
Returns:
This method must return a double value between 0 and 1.0
1.0 stands for a total matching without any differences and 0 means that there are no commonalities.
See Also:
EObject