net.i2p.addressbook

## Class SubscriptionIterator

- java.lang.Object
- - net.i2p.addressbook.SubscriptionIterator

- All Implemented Interfaces:
    Iterator<AddressBook>

       class SubscriptionIterator
      extends Object
      implements Iterator<AddressBook>

  An iterator over the subscriptions in a SubscriptionList. Note that this iterator returns AddressBook objects, and not Subscription objects. Yes, the EepGet fetch() is done in here in next().
  Author:
    Ragnarok

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SubscriptionIterator(List<Subscription> subscriptions, long delay, String proxyHost, int proxyPort)` Construct a SubscriptionIterator using the Subscriprions in List subscriptions.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `hasNext()`
    `AddressBook` | `next()` Yes, the EepGet fetch() is done in here in next().
    `void` | `remove()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SubscriptionIterator

          public SubscriptionIterator(List<Subscription> subscriptions,
                              long delay,
                              String proxyHost,
                              int proxyPort)

      Construct a SubscriptionIterator using the Subscriprions in List subscriptions.
      Parameters:
        `subscriptions` - List of Subscription objects that represent address books.
        `delay` - the minimum delay since last fetched for the iterator to actually fetch
        `proxyHost` - proxy hostname
        `proxyPort` - proxt port number

  - ### Method Detail

    - #### hasNext

          public boolean hasNext()

      Specified by:
        `hasNext` in interface `Iterator<AddressBook>`

    - #### next

          public AddressBook next()

      Yes, the EepGet fetch() is done in here in next(). see java.util.Iterator#next()
      Specified by:
        `next` in interface `Iterator<AddressBook>`
      Returns:
        an AddressBook (empty if the minimum delay has not been met)

    - #### remove

          public void remove()

      Specified by:
        `remove` in interface `Iterator<AddressBook>`