Class CompoundDiff

    • Constructor Detail

      • CompoundDiff

        public CompoundDiff()
        Creates an empty CompoundDiff instance.
      • CompoundDiff

        public CompoundDiff​(List<GraphDiff> diffs)
        Creates CompoundDiff instance. Note that a List is not cloned in this constructor, so subsequent calls to add and addAll would modify the original list.
    • Method Detail

      • isNoop

        public boolean isNoop()
        Returns true if this diff has no other diffs or if all of its diffs are noops.
        Specified by:
        isNoop in interface GraphDiff
      • apply

        public void apply​(GraphChangeHandler tracker)
        Iterates over diffs list, calling "apply" on each individual diff.
        Specified by:
        apply in interface GraphDiff
      • undo

        public void undo​(GraphChangeHandler tracker)
        Iterates over diffs list in reverse order, calling "apply" on each individual diff.
        Specified by:
        undo in interface GraphDiff