org.infai.emo.matcher.impl
Class ContainerComparator
java.lang.Object
org.infai.emo.matcher.Comparator
org.infai.emo.matcher.StructureComparator
org.infai.emo.matcher.impl.ContainerComparator
public class ContainerComparator
- extends StructureComparator
This comparator is used to calculate the matching of two elements which are containments of other elements in the model.
It compares the parent elements of both elements. Therefore it looks at the matching-values of the parent elements that were calculated during the comparison rounds before.
- Version:
- 1.0.0
- Author:
- Stanley Hillner
- See Also:
StructureComparator
Method Summary |
double |
compareTo(org.eclipse.emf.ecore.EObject leftElement,
org.eclipse.emf.ecore.EObject rightElement)
This method compares the given elements in summary with the containers in which they are located. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ContainerComparator
public ContainerComparator(Matching matching,
double comparisonCount)
-
compareTo
public double compareTo(org.eclipse.emf.ecore.EObject leftElement,
org.eclipse.emf.ecore.EObject rightElement)
- This method compares the given elements in summary with the containers in which they are located.
The containers must be compared previously before calling the compareTo
-method on the two 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:
- the union of the two comparisons of the containers and their children.
- See Also:
EObject