public class NameTree extends Dictionary
The NameTree class is similar to the Dictionary class in that
it associates keys and values, but it does this in a different way. The keys
in a NameTree are strings and are ordered and the values of the associated
keys may be an object of any type.
The NameTree class is primarily used to store named destinations
accessible via the document's Catalog. This class is very simple with only
one method which is responsible searching for the given key.
entries, FORM_TYPE_KEY, inited, isDeleted, isNew, LENGTH_KEY, library, SUBTYPE_KEY, TYPE_KEY| Constructor and Description |
|---|
NameTree(Library l,
java.util.HashMap h)
Creates a new instance of a NameTree.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List |
getNamesAndValues()
Depth fist traversal of the the tree returning a list of the name and
reference values of the leafs in the tree.
|
NameNode |
getRoot() |
void |
init()
Initiate the NameTree.
|
java.lang.Object |
searchName(java.lang.String key)
Searches for the given key in the name tree.
|
getEntries, getFloat, getInt, getLibrary, getNumber, getObject, getPObjectReference, isDeleted, isNew, setDeleted, setNew, setPObjectReference, toStringpublic NameTree(Library l, java.util.HashMap h)
l - document library.h - NameTree dictionary entries.public void init()
init in class Dictionarypublic java.util.List getNamesAndValues()
public java.lang.Object searchName(java.lang.String key)
key - key to look up in name tree.public NameNode getRoot()