Class NodeChangeQueue<N>

All Implemented Interfaces:
Serializable, Cloneable, Iterable<NodeChange<N>>, Collection<NodeChange<N>>, Deque<NodeChange<N>>, List<NodeChange<N>>, Queue<NodeChange<N>>, SequencedCollection<NodeChange<N>>, NodeChangeListener<N>

public class NodeChangeQueue<N> extends LinkedList<NodeChange<N>> implements NodeChangeListener<N>
A queuing implementation of the NodeChangeListener interface.
See Also:
  • Constructor Details

    • NodeChangeQueue

      public NodeChangeQueue()
    • NodeChangeQueue

      public NodeChangeQueue(Collection<? extends NodeChange<N>> c)
  • Method Details

    • broadcast

      public void broadcast(NodeChangeListener<N> listener)
    • onAdd

      public void onAdd(N target, N parent, N previous)
      Description copied from interface: NodeChangeListener
      A node was added.
      Specified by:
      onAdd in interface NodeChangeListener<N>
      Parameters:
      target - the added node
      parent - the parent node
      previous - the optional previous node
    • onCreate

      public void onCreate(N target, N parent, N previous, String name)
      Description copied from interface: NodeChangeListener
      A node was created.
      Specified by:
      onCreate in interface NodeChangeListener<N>
      Parameters:
      target - the created node
      parent - the parent node
      previous - the optional previous node
      name - the name of the created node
    • onRemove

      public void onRemove(N target, N parent)
      Description copied from interface: NodeChangeListener
      A node was removed.
      Specified by:
      onRemove in interface NodeChangeListener<N>
      Parameters:
      target - the removed node
      parent - the parent node
    • onDestroy

      public void onDestroy(N target, N parent)
      Description copied from interface: NodeChangeListener
      A node was destroyed.
      Specified by:
      onDestroy in interface NodeChangeListener<N>
      Parameters:
      target - the destroyed node
      parent - the parent node
    • onRename

      public void onRename(N target, N parent, String name)
      Description copied from interface: NodeChangeListener
      A node was renamed.
      Specified by:
      onRename in interface NodeChangeListener<N>
      Parameters:
      target - the renamed node
      parent - the parent node
      name - the new node name
    • onUpdate

      public void onUpdate(N target, NodeState state)
      Description copied from interface: NodeChangeListener
      A node was updated.
      Specified by:
      onUpdate in interface NodeChangeListener<N>
      Parameters:
      target - the updated node
      state - the new state
    • onMove

      public void onMove(N target, N from, N to, N previous)
      Description copied from interface: NodeChangeListener
      A node was moved.
      Specified by:
      onMove in interface NodeChangeListener<N>
      Parameters:
      target - the moved node.
      from - the previous parent
      to - the new parent
      previous - the optional previous node