Class NullImplementation.NullEnumerator

    • Method Detail

      • hasMoreElements

        public boolean hasMoreElements()
        Tests if this enumeration contains more elements.
        Specified by:
        hasMoreElements in interface Enumeration
        Returns:
        false
      • nextElement

        public Object nextElement()
        Returns the next element of this enumeration if this enumeration object has at least one more element to provide.
        Specified by:
        nextElement in interface Enumeration
        Returns:
        the next element of this enumeration.
        Throws:
        NoSuchElementException - always
      • hasNext

        public boolean hasNext()
        Returns true if the iteration has more elements.
        Specified by:
        hasNext in interface Iterator
      • remove

        public void remove()
        Removes from the underlying Collection the last element returned by the Iterator . This method can be called only once per call to next The behavior of an Iterator is unspecified if the underlying Collection is modified while the iteration is in progress in any way other than by calling this method. Optional operation.
        Specified by:
        remove in interface Iterator
        Throws:
        IllegalStateException - next has not yet been called, or remove has already been called after the last call to next.
      • iterator

        public Iterator iterator()
        Returns an Iterator instance with no values to enumerate.
        Specified by:
        iterator in interface Iterable
        Returns:
        an Iterator instance with no values to enumerate