Class NodeDiff

    • Field Detail

      • diffId

        protected int diffId
      • nodeId

        protected Object nodeId
    • Constructor Detail

      • NodeDiff

        public NodeDiff​(Object nodeId)
      • NodeDiff

        public NodeDiff​(Object nodeId,
                        int diffId)
    • Method Detail

      • isNoop

        public boolean isNoop()
        Description copied from interface: GraphDiff
        Returns true if this diff is simply a placeholder and does not perform any actual operation.
        Specified by:
        isNoop in interface GraphDiff
      • apply

        public abstract void apply​(GraphChangeHandler tracker)
        Description copied from interface: GraphDiff
        Calls appropriate methods on the handler to "replay" this change.
        Specified by:
        apply in interface GraphDiff
      • undo

        public abstract void undo​(GraphChangeHandler tracker)
        Description copied from interface: GraphDiff
        Calls appropriate methods on the handler to revert this change.
        Specified by:
        undo in interface GraphDiff
      • getNodeId

        public Object getNodeId()
      • getDiffId

        public int getDiffId()
        Returns an id of this diff that can be used for various purposes, such as identifying the order of the diff in a sequence.
      • setDiffId

        public void setDiffId​(int diffId)
        Sets an id of this diff that can be used for various purposes, such as identifying the order of the diff in a sequence.
      • compareTo

        public int compareTo​(NodeDiff o)
        Implements a Comparable interface method to compare based on diffId property.
        Specified by:
        compareTo in interface Comparable<NodeDiff>