TemplateHashModelEx2.KeyValuePairIterator (FreeMarker 2.3.35 API)
Description: declaration: package: freemarker.template, interface: TemplateHashModelEx2, interface: KeyValuePairIterator

Package freemarker.template

# Interface TemplateHashModelEx2.KeyValuePairIterator

All Known Implementing Classes:
  `MapKeyValuePairIterator`

Enclosing interface:
  TemplateHashModelEx2

public static interface TemplateHashModelEx2.KeyValuePairIterator
Iterates over the key-value pairs in a hash. This is very similar to an `Iterator`, but has a fixed item type, can throw `TemplateModelException`-s, and has no `remove()` method.

Since:
  2.3.25

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `hasNext()`
  Similar to `Iterator.hasNext()`.
  `TemplateHashModelEx2.KeyValuePair`
  `next()`
  Similar to `Iterator.next()`.

- ## Method Details

  - ### hasNext

    boolean hasNext() throws TemplateModelException
    Similar to `Iterator.hasNext()`.
    Throws:
      `TemplateModelException`

  - ### next

    TemplateHashModelEx2.KeyValuePair next() throws TemplateModelException
    Similar to `Iterator.next()`.
    Returns:
      Not `null`
    Throws:
      `NoSuchElementException`
      `TemplateModelException`