OpenNMS API 1.2.9

## org.opennms.netmgt.discovery
Class IPPollRange.IPPollRangeGenerator

    java.lang.Object
      org.opennms.netmgt.discovery.IPPollRange.IPPollRangeGenerator

All Implemented Interfaces:
  java.util.Enumeration, java.util.Iterator

Enclosing class:
  IPPollRange

final class IPPollRange.IPPollRangeGenerator
extends java.lang.Object
implements java.util.Enumeration, java.util.Iterator

The purpose of the IPPollRangeGenerator class is to provide an Enumeration or Iterator object that can be returned by the encapsulating class. The class implements the new style Iterator interface, as well as the old style Enumeration to allow the developer freedom of choice when cycling over ranges.

See Also:
  `Iterator`, `Enumeration`

Field Summary
`private java.util.Enumeration` `m_range` The range of address to generate.

Constructor Summary
`IPPollRange.IPPollRangeGenerator(java.util.Enumeration en)` Creates a poll range generator object.

Method Summary
`boolean` `hasMoreElements()` Returns true if the Enumeration described by this object still has more elements.
`boolean` `hasNext()` If there are more elements left in the iteration then a value of true is returned.
`java.lang.Object` `next()` Returns the next object in the iteration and increments the internal pointer.
`java.lang.Object` `nextElement()` Returns the next IPPollAddress in the enumeration.
`void` `remove()` The remove method is part of the Iterator interface and is optional.

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

Field Detail

### m_range

    private java.util.Enumeration m_range

  The range of address to generate.

Constructor Detail

### IPPollRange.IPPollRangeGenerator

    public IPPollRange.IPPollRangeGenerator(java.util.Enumeration en)

  Creates a poll range generator object.

Parameters:
  `en` - The Enumeration to use for address generation.

Method Detail

### hasMoreElements

    public boolean hasMoreElements()

  Returns true if the Enumeration described by this object still has more elements.

  Specified by:
    `hasMoreElements` in interface `java.util.Enumeration`

### nextElement

    public java.lang.Object nextElement()

  Returns the next IPPollAddress in the enumeration.

  Specified by:
    `nextElement` in interface `java.util.Enumeration`
  Throws:
    `java.util.NoSuchElementException` - Thrown if there are no more elements in the iteration.

### hasNext

    public boolean hasNext()

  If there are more elements left in the iteration then a value of true is returned. Else a false value is returned.

  Specified by:
    `hasNext` in interface `java.util.Iterator`

### next

    public java.lang.Object next()

  Returns the next object in the iteration and increments the internal pointer.

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

### remove

    public void remove()

  The remove method is part of the Iterator interface and is optional. Since it is not implemnted it will always throw an UnsupportedOperationException.

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

OpenNMS API 1.2.9

Generated by ranger on May 19 2007 2335.