Class NumberTree

java.lang.Object
com.datalogics.PDFL.NumberTree

public class NumberTree extends Object
The number tree is a common data structure in PDF files. The number tree is a type of dictionary that can store many more pairs of matched records than a standard object dictionary.

A number tree uses keys that are integers to map to data objects, sorted in ascending numerical order.

  • Constructor Details

    • NumberTree

      public NumberTree(Document doc)
  • Method Details

    • delete

      public void delete()
    • equals

      public boolean equals(Object rhs)
      Overrides:
      equals in class Object
    • get

      public PDFObject get(int key)
      Retrieves an entry from this NumberTree.

      Parameters:
      key - The integer of the PDFObject to get from the tree.
      Returns:
      - The PDFObject value corresponding to the supplied key
    • put

      public void put(int key, PDFObject value)
      Puts a new entry in this NumberTree. If an entry with this name is already in the tree, it is replaced.

      Parameters:
      key - The integer of the PDFObject to put in the tree.
      value - The PDFObject to be associated with key.
    • getPDFDict

      public PDFDict getPDFDict()
      Return the PDFDict of this NumberTree.

      Returns:
      PDFDict of the NumberTree
    • remove

      public void remove(int key)
      Removes the specified PDFObject from this NumberTree. It does nothing if no PDFObject of that number exists in this NumberTree.

      Parameters:
      key - The integer of the PDFObject to remove from the tree.