Class Document

  • All Implemented Interfaces:
    java.lang.Iterable<Node>, Sequence<Node>

    public class Document
    extends Block
    Node representing the root of an element hierarchy.
    • Constructor Detail

      • Document

        public Document()
      • Document

        public Document​(Document document,
                        boolean recursive)
    • Method Detail

      • duplicate

        public Document duplicate​(boolean recursive)
        Description copied from class: Node
        Creates a copy of this node.
        Specified by:
        duplicate in class Element
        Parameters:
        recursive - Whether to duplicate the children also.
        Returns:
        A copy of the current node.
      • insert

        public void insert​(Node node,
                           int index)
        Description copied from interface: Sequence
        Inserts an item into the sequence at a specific index.
        Specified by:
        insert in interface Sequence<Node>
        Overrides:
        insert in class Element
        Parameters:
        node - The item to be added to the sequence.
        index - The index at which the item should be inserted. Must be a value between 0 and getLength().