Class MatchedEmfObjects

All Implemented Interfaces:
IComparedObjects<org.eclipse.emf.ecore.EObject>, Cloneable
Direct Known Subclasses:
MatchedReference

public class MatchedEmfObjects extends ComparedEmfObjects
A representation of compared EMF objects with stored matched node Id.
  • Constructor Details

    • MatchedEmfObjects

      public MatchedEmfObjects()
      Constructs an empty set of matched objects.
    • MatchedEmfObjects

      public MatchedEmfObjects(org.eclipse.emf.ecore.EObject main, org.eclipse.emf.ecore.EObject other, org.eclipse.emf.ecore.EObject ancestor)
      Constructs matched objects set.
      Parameters:
      main - the main EMF object, can be null
      other - the other EMF object, can be null
      ancestor - the common ancestor EMF object, can be null
  • Method Details

    • setRelatedNodeId

      public void setRelatedNodeId(long nodeId)
      Stores the node id the compared objects belong to.
      Parameters:
      nodeId - the node id to store
    • getRelatedNodeId

      public Long getRelatedNodeId()
      Returns the node id the compared objects belong to.
      Returns:
      the related node id or null if node set
    • clone

      public IComparedObjects<org.eclipse.emf.ecore.EObject> clone() throws CloneNotSupportedException
      Description copied from interface: IComparedObjects
      Clones the compared object container
      Specified by:
      clone in interface IComparedObjects<org.eclipse.emf.ecore.EObject>
      Overrides:
      clone in class ComparedObjects<org.eclipse.emf.ecore.EObject>
      Returns:
      A new instance of the container of the same class. Never null. Internal data should be eligible for safe changes by the caller side
      Throws:
      CloneNotSupportedException - In case if cloning isn't supported