public class

DictIterator

extends Object
implements AutoCloseable
java.lang.Object
   ↳ com.pdftron.sdf.DictIterator
Known Direct Subclasses

Class Overview

DictIterator is used to traverse key/value pairs in a dictionary. For example a DictIterator can be used to print out all the entries in a given Obj dictionary as follows: DictIterator itr = dict.getDictIterator(); while (itr.hasNext()) { Obj key = itr.key(); cout << key.getName() << endl; Obj value = itr.value(); // ... itr.next() }

Summary

Public Methods
long __GetHandle()
void close()
Frees the native memory of the object.
void destroy()
Frees the native memory of the object.
boolean hasNext()
Checks if DictIterator can advance to the next item.
Obj key()
Get the key of the current dictionary entry
void next()
Advances the iterator to the next element of the collection.
Obj value()
Get the value of the current dictionary entry
[Expand]
Inherited Methods
From class java.lang.Object
From interface java.lang.AutoCloseable

Public Methods

public long __GetHandle ()

public void close ()

Frees the native memory of the object. This can be explicity called to control the deallocation of native memory and avoid situations where the garbage collector does not free the object in a timely manner.

public void destroy ()

Frees the native memory of the object. This can be explicity called to control the deallocation of native memory and avoid situations where the garbage collector does not free the object in a timely manner.

public boolean hasNext ()

Checks if DictIterator can advance to the next item.

Returns
  • true if the iterator can be successfully advanced to the next element; false if the end collection is reached.

public Obj key ()

Get the key of the current dictionary entry

Returns
  • the key of the current dictionary entry.

public void next ()

Advances the iterator to the next element of the collection.

public Obj value ()

Get the value of the current dictionary entry

Returns
  • the value of the current dictionary entry.