Class IteratorEnumeration<T>

  • All Implemented Interfaces:
    java.util.Enumeration<T>

    public class IteratorEnumeration<T>
    extends java.lang.Object
    implements java.util.Enumeration<T>
    Wraps an iterator into an enumeration API.
    • Constructor Summary

      Constructors 
      Constructor Description
      IteratorEnumeration​(java.util.Iterator<T> i)
      IteratorEnumeration constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.util.Iterator<T> getIterator()  
      boolean hasMoreElements()  
      T nextElement()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Enumeration

        asIterator
    • Constructor Detail

      • IteratorEnumeration

        public IteratorEnumeration​(java.util.Iterator<T> i)
        IteratorEnumeration constructor.
        Parameters:
        i - The Iterator to be enumerated
    • Method Detail

      • getIterator

        protected java.util.Iterator<T> getIterator()
      • hasMoreElements

        public boolean hasMoreElements()
        Specified by:
        hasMoreElements in interface java.util.Enumeration<T>
      • nextElement

        public T nextElement()
        Specified by:
        nextElement in interface java.util.Enumeration<T>