Class EnumerationDecorator<E>

  • Type Parameters:
    E - the type of elements returned by this enumeration.
    All Implemented Interfaces:
    java.util.Enumeration<E>, java.util.Iterator<E>

    public class EnumerationDecorator<E>
    extends AbstractEnumerationDecorator<E>
    An enumeration that wraps an existing enumeration.
    Author:
    Garret Wilson
    API Note:
    This enumeration also serves as an adapter, converting an enumeration to an Iterator.
    Implementation Specification:
    This implementation does not support element removal.
    Implementation Note:
    Subclasses may override AbstractEnumerationDecorator.hasMoreElements() and/or AbstractEnumerationDecorator.nextElement(), and Iterator compatibility will be maintained.
    • Constructor Summary

      Constructors 
      Constructor Description
      EnumerationDecorator​(java.util.Enumeration<E> enumeration)
      Enumeration constructor.
    • Constructor Detail

      • EnumerationDecorator

        public EnumerationDecorator​(@Nonnull
                                    java.util.Enumeration<E> enumeration)
        Enumeration constructor.
        Parameters:
        enumeration - The enumeration this enumeration will decorate.
        Throws:
        java.lang.NullPointerException - if the given enumeration is null.