com.tibco.ftl

## Interface TibMapIterator

-     public interface TibMapIterator

  Map iterators iterate over the key/value pairs in a map.

  An iterator can produce values added to a map after the iterator is created.

  To create a map iterator object, see `TibMap.createIterator`.

  This file defines map iterator calls.

  Since:
    4.2

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `PROPERTY_STRING_MATCHER` Property for map iterator matcher; string.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `currentKey()` Get the key from the current key/value pair.
    `Message` | `currentValue()` Get the message value from the current key/value pair.
    `void` | `destroy()` Destroy a map iterator object, reclaiming its resources.
    `boolean` | `next()` Iterate to the next key/value pair.

- - ### Field Detail

    - #### PROPERTY_STRING_MATCHER

          static final java.lang.String PROPERTY_STRING_MATCHER

      Property for map iterator matcher; string.

      Supply this property to `TibMap.createIterator`.

      Limit the iterator to only matches of the value to this string.

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### next

          boolean next()
                throws FTLException

      Iterate to the next key/value pair.

      If the iterator has an associated lock and the process does not hold that lock, the call throws an exception and does not advance to the next pair. (See also `TibMap.createIterator(lock,props)`.)

      To get the key and value from each pair, see `TibMapIterator.currentKey` and `TibMapIterator.currentValue`.

      Returns:
        - True indicates that the next pair is ready.
        - False indicates that the iteration is complete.
      Throws:
        `FTLException`
      Since:
        4.2

    - #### currentKey

          java.lang.String currentKey()
                               throws FTLException

      Get the key from the current key/value pair.

      The library owns the key string, and may destroy it after the program calls `TibMapIterator.next` or `TibMapIterator.destroy`.

      Returns:
        The key string.
      Throws:
        `FTLException`
      Since:
        4.2

    - #### currentValue

          Message currentValue()
                        throws FTLException

      Get the message value from the current key/value pair.

      The library owns the message object, and may destroy it after the program calls `TibMapIterator#next` or `TibMapIterator.destroy`.

      Returns:
        The value (which is a message object).
      Throws:
        `FTLException`
      Since:
        4.2

    - #### destroy

          void destroy()
                throws FTLException

      Destroy a map iterator object, reclaiming its resources.
      Throws:
        `FTLException`
      Since:
        4.2