Interface IElementDelta


public interface IElementDelta
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Difference constant (value 1) indicating one side was added.
    static final int
    Difference constant (value 3) indicating side changed.
    static final int
    Bit mask (value 3) for extracting the kind of difference.
    static final int
    Three-way change constant (value 12) indicating a change on left and right sides.
    static final int
    Difference constant (value 2) indicating one side was removed.
    static final int
    Bit mask (value 12) for extracting the direction of a three-way change.
    static final int
    Three-way change constant (value 4) indicating a change on left side.
    static final int
    Difference constant (value 0) indicating no difference.
    static final int
    Constant (value 16) indicating a change on left and right side (with respect to ancestor) but left and right are identical.
    static final int
    Three-way change constant (value 8) indicating a change on right side.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    Returns a handle for the affected masterelement.
    Returns the children of this container.
     
    int
    Returns the kind of difference as defined in Differencer.
    Returns the parent of this element.
     
    boolean
    Returns whether this container has at least one child.
    boolean
    traverseChildren(IDeltaVisitor visitor, boolean includePhantoms)
     
  • Field Details

    • NO_CHANGE

      static final int NO_CHANGE
      Difference constant (value 0) indicating no difference.
      See Also:
    • ADDITION

      static final int ADDITION
      Difference constant (value 1) indicating one side was added.
      See Also:
    • DELETION

      static final int DELETION
      Difference constant (value 2) indicating one side was removed.
      See Also:
    • CHANGE

      static final int CHANGE
      Difference constant (value 3) indicating side changed.
      See Also:
    • CHANGE_TYPE_MASK

      static final int CHANGE_TYPE_MASK
      Bit mask (value 3) for extracting the kind of difference.
      See Also:
    • LEFT

      static final int LEFT
      Three-way change constant (value 4) indicating a change on left side.
      See Also:
    • CONFLICTING

      static final int CONFLICTING
      Three-way change constant (value 12) indicating a change on left and right sides.
      See Also:
    • DIRECTION_MASK

      static final int DIRECTION_MASK
      Bit mask (value 12) for extracting the direction of a three-way change.
      See Also:
    • PSEUDO_CONFLICT

      static final int PSEUDO_CONFLICT
      Constant (value 16) indicating a change on left and right side (with respect to ancestor) but left and right are identical.
      See Also:
  • Method Details

    • getKind

      int getKind()
      Returns the kind of difference as defined in Differencer.
      Returns:
      the kind of difference as defined in Differencer
    • getParent

      IElementDelta getParent()
      Returns the parent of this element. If the object is the root of a hierarchy null is returned.
      Returns:
      the parent of this element, or null if the element has no parent
    • getChildren

      IElementDelta[] getChildren()
      Returns the children of this container. If this container has no children an empty array is returned (not null).
      Returns:
      the children of this container as an array
    • hasChildren

      boolean hasChildren()
      Returns whether this container has at least one child. In some cases this methods avoids having to call the potential more costly getChildren method.
      Returns:
      true if this container has at least one child
    • getBaseElement

      IBaseElement getBaseElement()
      Returns a handle for the affected masterelement.

      For additions (ADDED), this handle describes the newly-added masterelement; i.e., the one in the "after" state.

      For changes (CHANGED), this handle also describes the masterelement in the "after" state.

      For removals (REMOVED), this handle describes the masterelement in the "before" state. Even though this resource would not normally exist in the current workspace, the type of resource that was removed can be determined from the handle.

      For phantom additions and removals (ADDED_PHANTOM and REMOVED_PHANTOM), this is the handle of the phantom resource.

      Returns:
      the affected masterelement (handle)
    • getType

      String getType()
    • getId

      String getId()
    • accept

      boolean accept(IDeltaVisitor visitor)
    • traverseChildren

      boolean traverseChildren(IDeltaVisitor visitor, boolean includePhantoms)