Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.knowgate.misc
Class IteratorEnumeration<ElementType>

    java.lang.Object
      com.knowgate.misc.IteratorEnumeration<ElementType>

Type Parameters:
  `ElementType` - Type of element being enumerated

All Implemented Interfaces:
  java.util.Enumeration<ElementType>

    public class IteratorEnumeration<ElementType>

extends java.lang.Object
implements java.util.Enumeration<ElementType>

Converts an iterator to an enumerator.

More information about this class is available from ostermiller.org.

Since:
  ostermillerutils 1.03.00

Constructor Summary
`IteratorEnumeration(java.util.Iterator<ElementType> iterator)` Create an Enumeration from an Iterator.

Method Summary
`boolean` | `hasMoreElements()` Tests if this enumeration contains more elements.
`ElementType` | `nextElement()` Returns the next element of this enumeration if this enumeration object has at least one more element to provide.

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

Constructor Detail

### IteratorEnumeration

    public IteratorEnumeration(java.util.Iterator<ElementType> iterator)

  Create an Enumeration from an Iterator.

  Parameters:
    `iterator` - Iterator to convert to an enumeration.
  Since:
    ostermillerutils 1.03.00

Method Detail

### hasMoreElements

    public boolean hasMoreElements()

  Tests if this enumeration contains more elements.

  Specified by:
    `hasMoreElements` in interface `java.util.Enumeration<ElementType>`
  Returns:
    true if and only if this enumeration object contains at least one more element to provide; false otherwise.
  Since:
    ostermillerutils 1.03.00

### nextElement

    public ElementType nextElement()
                            throws java.util.NoSuchElementException

  Returns the next element of this enumeration if this enumeration object has at least one more element to provide.

  Specified by:
    `nextElement` in interface `java.util.Enumeration<ElementType>`
  Returns:
    the next element of this enumeration.
  Throws:
    `java.util.NoSuchElementException` - if no more elements exist.
  Since:
    ostermillerutils 1.03.00

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD