NameTree

Overview

NameTree is a class in Aspose.PDF FOSS for Java.

Read/write view over a PDF name tree (ISO 32000-1:2008, §7.9.6).

This class provides 12 methods for working with NameTree objects in Java programs. Available methods include: NameTree, clear, containsKey, entries, entriesUnmodifiable, get, getRoot, isEmpty, keys, put, remove, size. All public members are accessible to any Java application after installing the Aspose.PDF FOSS for Java package. Properties: empty, root.

Properties

NameTypeAccessDescription
rootPdfDictionaryReadReturns the underlying root dictionary, or {@code null} if this view
was constructed over a {@code null} root.
emptybooleanReadReturns whether the tree has no entries.

Methods

SignatureDescription
NameTree(root: PdfDictionary)Wraps the given root dictionary.
getRoot()PdfDictionaryReturns the underlying root dictionary, or {@code null} if this view
was constructed over a {@code null} root.
isEmpty()booleanReturns whether the tree has no entries.
size()intReturns the number of (key, value) pairs in the tree.
get(key: String)PdfBaseLooks up a key.
containsKey(key: String)booleanReturns whether the tree contains the given key.
entries()List<Map.Entry<String, PdfBase>>Returns all entries in tree order (which, for a conformant tree, is
key-sorted order).
keys()List<String>Returns all keys in tree order.
put(key: String, value: PdfBase)PdfBaseInserts or replaces a value.
remove(key: String)PdfBaseRemoves a key.
clear()Empties the tree: drops all {@code /Kids}, {@code /Limits} and any
{@code /Names} array contents.
entriesUnmodifiable()List<Map.Entry<String, PdfBase>>Returns an unmodifiable view of {@link #entries()} for callers that
want a {@link List} interface but no mutation.

See Also

 English