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.hasCurrent()) { 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 hasCurrent()
Checks if the current iterator is valid.
boolean hasNext()
Checks if the current iterator is valid.
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 hasCurrent ()

Checks if the current iterator is valid.

Returns
  • true if the current iterator is valid and not the end of the collection

public boolean hasNext ()

Checks if the current iterator is valid.

Returns
  • true if the current iterator is valid and not the end of the collection Deprecated, prefer hasCurrent()

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.