Interface Parent

All Superinterfaces:
Node
All Known Implementing Classes:
Document, Element, NodeWithChildren

public interface Parent extends Node
This is an interface for anything which can be a parent: Element and Document.
See Also:
  • Method Details

    • addNode

      Parent addNode(Node node)
    • addNode

      Parent addNode(int index, Node node)
    • addNodes

      Parent addNodes(Node... nodes)
    • addNodes

      Parent addNodes(Collection<? extends Node> nodes)
    • addNodes

      Parent addNodes(int index, Node... nodes)
    • addNodes

      Parent addNodes(int index, Collection<? extends Node> nodes)
    • getNode

      Node getNode(int index)
      Get a specific node from the list
    • removeNode

      Node removeNode(int index)
      Remove a node from the list
      Returns:
      The removed node.
    • removeNode

      boolean removeNode(Node node)
      Remove a node from the list
      Returns:
      true, if the node is in the list
    • clearNodes

      Parent clearNodes()
      Remove all nodes
    • getNodes

      List<Node> getNodes()
      Get the list of child nodes.

      CAUTION: Changes to this list will modify the actual data structure! So don't do this unless you know what you're doing!

    • nodeIndexOf

      int nodeIndexOf(Node node)
      The index of the node in the node list or -1 if it isn't in the list
    • nodeCount

      int nodeCount()
      The number of nodes in the list
    • hasNodes

      boolean hasNodes()
      Does this node have children?
    • getChild

      Element getChild(String path)
      Find a child element (not a node!) by path