Class ConfList

All Implemented Interfaces:
Serializable, Cloneable, Comparable<ConfList>

public class ConfList extends ConfValue implements Cloneable, Serializable, Comparable<ConfList>
DATA_CONTAINER - Corresponds to the YANG leaf-list.
See Also:
  • Constructor Details

  • Method Details

    • set

      public ConfObject set(int index, ConfObject val)
    • get

      public ConfObject get(int index)
    • elements

      public ConfObject[] elements()
      Return a copy as array of this
    • addElem

      public void addElem(ConfObject n)
      Add an element in the end of this ConfList unless it already exists
      Parameters:
      n - object to add
    • delete

      public void delete(ConfObject n)
      Delete arbitrary object from the ConfList
      Parameters:
      n - object to remove
    • move

      public void move(ConfObject n, ConfList.WhereTo where, ConfObject to) throws ConfException
      Move a list element to a new position in the list. The destination can be at the beginning, the end or in a relation to another element. This only makes sense for leaf-lists that are ordered by user.
      Parameters:
      n - object to move according to WhereTo
      where - How the move should be performed. Move object WhereTo.FIRST or WhereTo.LAST or move object WhereTo.BEFORE or WhereTo.AFTER the element to.
      to - If the value of whereTo is WhereTo.FIRST or WhereTo.LAST this argument ignored
      Throws:
      ConfException
    • isMember

      public boolean isMember(ConfObject o)
    • length

      public int length()
    • equals

      public boolean equals(Object o)
      Description copied from class: ConfValue
      Determine if two ConfValue are equal. In general, ConfObjects are equal if the components they consist of are equal.
      Specified by:
      equals in class ConfValue
      Parameters:
      o - The object to compare to.
      Returns:
      true if the objects are identical.
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in class ConfValue
    • toString

      public String toString()
      Specified by:
      toString in class ConfValue
      Returns:
      the printable representation of the object.
    • encode

      public ConfEObject encode()
      Description copied from class: ConfValue
      encode value.
      Specified by:
      encode in class ConfValue
    • compareTo

      public int compareTo(ConfList o)
      Specified by:
      compareTo in interface Comparable<ConfList>