Class NavuChange

Object
com.tailf.navu.NavuChange

public class NavuChange extends Object
This class handles changes on a node. The changes can be CREATE or DELETE if the node has been created or deleted and MODIFY if a subordinate node has been created, deleted or modified.
  • Method Details

    • add

      public boolean add(NavuNode e)
      Adds a node.
      Parameters:
      e - changed node.
      Returns:
      true if this node already was added.
    • contains

      public boolean contains(NavuNode node)
      Checks if a node is already contained by the change.
      Parameters:
      node - a node to check.
      Returns:
      true if it is contained.
    • get

      public NavuNode get(int index)
      Returns a node at a certain position.
      Parameters:
      index - the index to use
      Returns:
      the node at this position. null if no node exists.
    • getChange

      public DiffIterateOperFlag getChange()
      Returns:
      the change type.
    • getKey

      public ConfKey getKey()
      Returns:
      the key of the change.
    • isEmpty

      public boolean isEmpty()
      Returns:
      true if no changes exists.
    • iterator

      public Iterator<NavuNode> iterator()
      Returns:
      an iterator of the changes.
    • setChange

      public void setChange(DiffIterateOperFlag op)
      Sets the change type.
      Parameters:
      op - change type.
    • size

      public int size()
      Returns:
      the number of changes.
    • subList

      public List<NavuNode> subList(int startIndex, int stopindex)
      Parameters:
      startIndex - first index of the sub-list
      stopindex - stop index (exclusive)
      Returns:
      a subList
    • toArray

      public Object[] toArray()
      Converts the list of changes to an array.
      Returns:
      an array of objects.
    • toArray

      public <T> T[] toArray(T[] a)
      Type Parameters:
      T -
      Parameters:
      a -
      Returns:
      an array of type T.