IT. Expert System.

Android Reference

Iterator


java.util

Interface Iterator<E>

  • Type Parameters:
    E - the type of object returned by the iterator.
    All Known Subinterfaces:
    EntityIterator, ListIterator<E>
    All Known Implementing Classes:
    CursorEntityIterator, CursorJoiner, Scanner, TextUtils.SimpleStringSplitter


    public interface Iterator<E>
    An iterator over a sequence of objects, such as a collection.

    If a collection has been changed since the iterator was created, methods next and hasNext() may throw a ConcurrentModificationException. It is not possible to guarantee that this mechanism works in all cases of unsynchronized concurrent modification. It should only be used for debugging purposes. Iterators with this behavior are called fail-fast iterators.

    Implementing Iterable and returning an Iterator allows your class to be used as a collection with the enhanced for loop.

    • Method Summary

      Methods
      Modifier and Type Method and Description
      boolean hasNext()
      Returns true if there is at least one more element, false otherwise.
      E next()
      Returns the next object and advances the iterator.
      void remove()
      Removes the last object returned by next from the collection.
    • Method Detail

      • hasNext

        boolean hasNext()
        Returns true if there is at least one more element, false otherwise.
        See Also:
        next()
      • next

        E next()
        Returns the next object and advances the iterator.
        Returns:
        the next object.
        Throws:
        NoSuchElementException - if there are no more elements.
        See Also:
        hasNext()
      • remove

        void remove()
        Removes the last object returned by next from the collection. This method can only be called once between each call to next.
        Throws:
        UnsupportedOperationException - if removing is not supported by the collection being iterated.
        IllegalStateException - if next has not been called, or remove has already been called after the last call to next.


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 445 / . Delta: 0.03570 с