org.infai.emo.matcher.impl
Class ReferenceComparator

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

public class ReferenceComparator
extends ElementComparator

Class for comparing the references of two elements.
This comparator needs a matching from a previous round for computing matching-values of the referenced elements.

Version:
1.1.2
Author:
Stanley Hillner
See Also:
ElementComparator

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

ReferenceComparator

public ReferenceComparator()
Method Detail

compareTo

public double compareTo(org.eclipse.emf.ecore.EObject leftElement,
                        org.eclipse.emf.ecore.EObject rightElement)
compare the references of the given elements. Therefore the comparator takes the matching-values of the referenced elements into account.

Specified by:
compareTo in class Comparator
Parameters:
leftElement - the left element of the comparison
rightElement - the right element of the 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