Class PageTreeNode

  • All Implemented Interfaces:
    PDFObject

    class PageTreeNode
    extends java.lang.Object
    implements PDFObject
    Represents an intermediate node in the page tree of a PDF document.
    • Constructor Summary

      Constructors 
      Constructor Description
      PageTreeNode​(PageTreeNode parent)
      Initializes a PageTreeNode with the specified parent node.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(Page page)
      Adds the specified Page to the node's children.
      int getCount()
      Returns the total number of Page objects in this subtree.
      java.util.List<Page> getKids()
      Returns all Page objects that are immediate children of this node.
      PageTreeNode getParent()
      Returns the parent of this node.
      java.lang.String getType()
      Returns the type of this object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • children

        private final java.util.List<Page> children
    • Constructor Detail

      • PageTreeNode

        public PageTreeNode​(PageTreeNode parent)
        Initializes a PageTreeNode with the specified parent node.
        Parameters:
        parent - Parent node or null to create a root node.
    • Method Detail

      • getType

        public java.lang.String getType()
        Returns the type of this object. The return value is always Pages.
        Returns:
        The String Pages.
      • getParent

        public PageTreeNode getParent()
        Returns the parent of this node. If this node is a root node, the method returns null.
        Returns:
        Parent node or null, if this is a root node.
      • add

        public void add​(Page page)
        Adds the specified Page to the node's children.
        Parameters:
        page - Page to be added.
      • getKids

        public java.util.List<Page> getKids()
        Returns all Page objects that are immediate children of this node.
        Returns:
        List of child pages.
      • getCount

        public int getCount()
        Returns the total number of Page objects in this subtree.
        Returns:
        Number of pages that are direct or indirect children.