org.infai.emo.matcher.impl
Class ContentsComparator
java.lang.Object
org.infai.emo.matcher.Comparator
org.infai.emo.matcher.StructureComparator
org.infai.emo.matcher.impl.ContentsComparator
public class ContentsComparator
- extends StructureComparator
Compares the contents, thus the children of the two elements if you watch the models in a tree notation.
- Version:
- 1.1.0
- Author:
- Stanley Hillner
- See Also:
StructureComparator
Method Summary |
double |
compareTo(org.eclipse.emf.ecore.EObject leftElement,
org.eclipse.emf.ecore.EObject rightElement)
Compare the children of both elements. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ContentsComparator
public ContentsComparator(Matching matching,
double comparisonCount)
-
compareTo
public double compareTo(org.eclipse.emf.ecore.EObject leftElement,
org.eclipse.emf.ecore.EObject rightElement)
- Compare the children of both elements.
Only direct children are considered at the comparison. Therefore the comparison determines the matching-values of previous rounds for the tuples oft the child-elements.
- Specified by:
compareTo
in class Comparator
- Parameters:
leftElement
- the left element for the comparison of the containment.rightElement
- the right element for the containment-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