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

## org.apache.tiles.util
Class IteratorEnumeration<E>

    java.lang.Object
      org.apache.tiles.util.IteratorEnumeration<E>

Type Parameters:
  `E` - The type of the enumerated elements.

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

    public class IteratorEnumeration<E>

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

Copied and modified from Apache Commons Collections 3.2.1.
Adapter to make an `Iterator` instance appear to be an `Enumeration` instance.

Since:
  Commons Collections 1.0
Version:
  $Revision: 797916 $ $Date: 2008-04-10 13:33:15 +0100 (Thu, 10 Apr 2008) $
Author:
  James Strachan

Constructor Summary
`IteratorEnumeration(java.util.Iterator<E> iterator)` Constructs a new `IteratorEnumeration` that will use the given iterator.

Method Summary
`boolean` | `hasMoreElements()` Returns true if the underlying iterator has more elements.
`E` | `nextElement()` Returns the next element from the underlying iterator.

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<E> iterator)

  Constructs a new `IteratorEnumeration` that will use the given iterator.

  Parameters:
    `iterator` - the iterator to use

Method Detail

### hasMoreElements

    public boolean hasMoreElements()

  Returns true if the underlying iterator has more elements.

  Specified by:
    `hasMoreElements` in interface `java.util.Enumeration<E>`
  Returns:
    true if the underlying iterator has more elements

### nextElement

    public E nextElement()

  Returns the next element from the underlying iterator.

  Specified by:
    `nextElement` in interface `java.util.Enumeration<E>`
  Returns:
    the next element from the underlying iterator.
  Throws:
    `java.util.NoSuchElementException` - if the underlying iterator has no more elements

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

Copyright © 2001-2010 Apache Software Foundation. All Rights Reserved.