OpenNMS API 1.2.9

## org.opennms.netmgt.discovery
Class IPGenerator.IteratorChain

    java.lang.Object
      org.opennms.netmgt.discovery.IPGenerator.IteratorChain

All Implemented Interfaces:
  java.util.Iterator

Enclosing class:
  IPGenerator

static final class IPGenerator.IteratorChain
extends java.lang.Object
implements java.util.Iterator

This class is used to chain a set of common iterators together so that when on iterator is exhausted the next one is polled. This allows a set of iterators to be treated as a single iterator.

Author:
  Brian Weaver , OpenNMS

Field Summary
`private java.util.List` `m_iterators` The chained list of iterators.

Constructor Summary
`(package private)` `IPGenerator.IteratorChain()` Constructs a new iterator chain

Method Summary
`(package private) void` `add(java.util.Iterator iter)` Adds an iterator to the chain
`boolean` `hasNext()` This method returns true if an iterator in the chain has a next element.
`java.lang.Object` `next()` This method returns the next element in the iterator chain.
`void` `remove()` Removes the current element from the iterator.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### m_iterators

    private java.util.List m_iterators

  The chained list of iterators.

Constructor Detail

### IPGenerator.IteratorChain

    IPGenerator.IteratorChain()

  Constructs a new iterator chain

Method Detail

### add

    void add(java.util.Iterator iter)

  Adds an iterator to the chain

  Parameters:
    `iter` - The iterator to add.

### hasNext

    public boolean hasNext()

  This method returns true if an iterator in the chain has a next element.

  Specified by:
    `hasNext` in interface `java.util.Iterator`
  Returns:
    True if there is a next element.

### next

    public java.lang.Object next()

  This method returns the next element in the iterator chain. If there are no elements remaining then an exception is generated.

  Specified by:
    `next` in interface `java.util.Iterator`
  Returns:
    The next object in the chain.
  Throws:
    `java.util.NoSuchElementException` - Thrown if there are no more elements.

### remove

    public void remove()

  Removes the current element from the iterator. This method is not supported and always throws the exception `UnsupportedOperationException`.

  Specified by:
    `remove` in interface `java.util.Iterator`
  Throws:
    `java.lang.UnsupportedOperationException` - Always Thrown.

OpenNMS API 1.2.9

Generated by ranger on May 19 2007 2335.