Package jmri.util

Class IterableEnumeration<T>

  • Type Parameters:
    T - the supported type
    All Implemented Interfaces:
    java.lang.Iterable<T>

    public class IterableEnumeration<T>
    extends java.lang.Object
    implements java.lang.Iterable<T>
    Provide an Iterable interface for an Enumeration

    From JavaSpecialists issue 107

    • Constructor Summary

      Constructors 
      Constructor Description
      IterableEnumeration​(java.util.Enumeration<T> en)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Iterator<T> iterator()  
      static <T> java.lang.Iterable<T> make​(java.util.Enumeration<T> en)  
      • Methods inherited from class java.lang.Object

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

        forEach, spliterator
    • Method Detail

      • iterator

        public java.util.Iterator<Titerator()
        Specified by:
        iterator in interface java.lang.Iterable<T>
      • make

        public static <T> java.lang.Iterable<T> make​(java.util.Enumeration<T> en)