Class NodeDescription

java.lang.Object
com._1c.g5.v8.dt.internal.testing.compare.NodeDescription

public class NodeDescription extends Object
Node description to be comparable between different comparison sessions. Each node may have unique description. Descriptions can represent any node in the comparison tree of any depth.
  • Constructor Details

    • NodeDescription

      public NodeDescription()
      Creates empty description. Useful for root comparison nodes.
    • NodeDescription

      public NodeDescription(NodeDescription parentDescription, ComparisonNode node, ComparisonContext context)
      Creates description for the specified comparison node.
      Parameters:
      parentDescription - the parent description, cannot be null
      node - the comparison node to create description for, cannot be null
      context - the comparison context, cannot be null
  • Method Details

    • getParentDescription

      public NodeDescription getParentDescription()
      Gets parent description.
      Returns:
      the parent description, may be null
    • getSide

      public ComparisonSide getSide()
      Gets side the node related to.
      Returns:
      the side, may be null for both-sides
    • isOneSide

      public boolean isOneSide()
      Tells whether the description relates to one-side comparison node.
      Returns:
      true for one-side node, false otherwise
    • getFeature

      public org.eclipse.emf.ecore.EStructuralFeature getFeature()
      Gets feature the node related to.
      Returns:
      the feature or null if the node is not related to any feature
    • getMainSymlink

      public String getMainSymlink()
      Gets node's main symlink.
      Returns:
      the main symlink, may be null
    • getOtherSymlink

      public String getOtherSymlink()
      Gets node's other symlink.
      Returns:
      the other symlink, may be null
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object object)
      Overrides:
      equals in class Object