Class ArrayEnumeration

  • All Implemented Interfaces:
    Enumeration

    public class ArrayEnumeration
    extends Object
    implements Enumeration
    An enumeration that iterates over an array.
    Author:
    Thomas Morgner
    • Constructor Detail

      • ArrayEnumeration

        public ArrayEnumeration​(Object[] objectarray)
        Creates a new enumeration for the given array.
        Parameters:
        objectarray - the array over which to iterate
        Throws:
        NullPointerException - if the array is null.
    • Method Detail

      • hasMoreElements

        public boolean hasMoreElements()
        Returns true if this enumeration has at least one more Element.
        Specified by:
        hasMoreElements in interface Enumeration
        Returns:
        true, if there are more elements, false otherwise.