Class CompareControls


  • public final class CompareControls
    extends java.lang.Object
    Class to compare Controls for equality.
    Author:
    Eugen Neufeld
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean areEqual​(VControl left, org.eclipse.emf.ecore.EObject leftDomainModel, VControl right, org.eclipse.emf.ecore.EObject rightDomainModel)
      Compares to VControls.
      static boolean areEqual​(VDomainModelReference left, org.eclipse.emf.ecore.EObject leftDomainModel, VDomainModelReference right, org.eclipse.emf.ecore.EObject rightDomainModel)
      Compares to VDomainModelReferences by comparing all values.
      static boolean areValuesEqual​(java.lang.Object leftValue, org.eclipse.emf.ecore.EStructuralFeature leftStructuralFeature, java.lang.Object rightValue, org.eclipse.emf.ecore.EStructuralFeature rightStructuralFeature)
      Compares two EStructuralFeatures and their values.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • areEqual

        public static boolean areEqual​(VControl left,
                                       org.eclipse.emf.ecore.EObject leftDomainModel,
                                       VControl right,
                                       org.eclipse.emf.ecore.EObject rightDomainModel)
        Compares to VControls. This is just a convenience method which delegates to areEqual(VDomainModelReference,EObject, VDomainModelReference,EObject).
        Parameters:
        left - the first VControl to compare
        leftDomainModel - The domain model of the left VControl
        right - the second VControl to compare
        rightDomainModel - The domain model of the right VControl
        Returns:
        true if all values of the VDomainModelReferences are equal
      • areValuesEqual

        public static boolean areValuesEqual​(java.lang.Object leftValue,
                                             org.eclipse.emf.ecore.EStructuralFeature leftStructuralFeature,
                                             java.lang.Object rightValue,
                                             org.eclipse.emf.ecore.EStructuralFeature rightStructuralFeature)
        Compares two EStructuralFeatures and their values. If both are null, they are equal. For a single reference, the referenced EObjects are compare (equals). For a "many" references, a list entries are compared.
        Parameters:
        leftValue - the value of the left EStructuralFeature
        leftStructuralFeature - the left EStructuralFeature
        rightValue - the value of the right EStructuralFeature
        rightStructuralFeature - the right EStructuralFeature
        Returns:
        whether the values are equal