public class NumberTree
extends java.lang.Object
Constructor and Description |
---|
NumberTree(Obj number_tree)
Create a high level NumberTree wrapper around an existing SDF/Cos NumberTree.
|
Modifier and Type | Method and Description |
---|---|
void |
erase(DictIterator pos)
Removes the NumberTree entry pointed by the iterator.
|
void |
erase(long key)
Removes the specified object from the tree.
|
DictIterator |
getIterator()
Get the iterator.
|
DictIterator |
getIterator(long key)
Search for the specified key in the NumberTree.
|
Obj |
getSDFObj()
Get the SDFObj.
|
Obj |
getValue(long key)
Get the value of the specified NumberTree.
|
boolean |
isValid()
Checks if NumberTree is valid.
|
void |
put(long key,
Obj value)
Puts a new entry in the name tree.
|
public NumberTree(Obj number_tree)
number_tree
- SDF/Cos root of the NumberTree object.public boolean isValid() throws PDFNetException
PDFNetException
public DictIterator getIterator(long key) throws PDFNetException
key
- the number representing the key to be found.
NumberTreeIterator i = dests.find(5);
if (i.hasNext()) {
double key = i.getKey()->getNumber();
Obj value=i.getValue();
}
PDFNetException
public Obj getValue(long key) throws PDFNetException
key
- the key of the NumberTreePDFNetException
public DictIterator getIterator() throws PDFNetException
for (NumberTreeIterator i = dests.getIterator(); i.hasNext(); i.next())
num = i.GetKey().GetNumber();
PDFNetException
public void put(long key, Obj value) throws PDFNetException
key
- A number representing the key of the new entry.value
- the valuePDFNetException
public void erase(long key) throws PDFNetException
key
- A number representing the key of the entry to be removed.PDFNetException
public void erase(DictIterator pos) throws PDFNetException
pos
- the posPDFNetException
public Obj getSDFObj()