IT. Expert System.

Android Reference

ListIterator


java.util

Interface ListIterator<E>

  • All Superinterfaces:
    Iterator<E>


    public interface ListIterator<E>
    extends Iterator<E>
    An ListIterator is used to sequence over a List of objects. ListIterator can move backwards or forwards through the list.
    • Method Summary

      Methods
      Modifier and Type Method and Description
      void add(E object)
      Inserts the specified object into the list between next and previous.
      boolean hasNext()
      Returns whether there are more elements to iterate.
      boolean hasPrevious()
      Returns whether there are previous elements to iterate.
      E next()
      Returns the next object in the iteration.
      int nextIndex()
      Returns the index of the next object in the iteration.
      E previous()
      Returns the previous object in the iteration.
      int previousIndex()
      Returns the index of the previous object in the iteration.
      void remove()
      Removes the last object returned by next or previous from the list.
      void set(E object)
      Replaces the last object returned by next or previous with the specified object.
    • Method Detail

      • add

        void add(E object)
        Inserts the specified object into the list between next and previous. The object inserted will be the previous object.
        Parameters:
        object - the object to insert.
        Throws:
        UnsupportedOperationException - if adding is not supported by the list being iterated.
        ClassCastException - if the class of the object is inappropriate for the list.
        IllegalArgumentException - if the object cannot be added to the list.
      • hasNext

        boolean hasNext()
        Returns whether there are more elements to iterate.
        Specified by:
        hasNext in interface Iterator<E>
        Returns:
        true if there are more elements, false otherwise.
        See Also:
        next()
      • hasPrevious

        boolean hasPrevious()
        Returns whether there are previous elements to iterate.
        Returns:
        true if there are previous elements, false otherwise.
        See Also:
        previous()
      • nextIndex

        int nextIndex()
        Returns the index of the next object in the iteration.
        Returns:
        the index of the next object, or the size of the list if the iterator is at the end.
        Throws:
        NoSuchElementException - if there are no more elements.
        See Also:
        next()
      • previous

        E previous()
        Returns the previous object in the iteration.
        Returns:
        the previous object.
        Throws:
        NoSuchElementException - if there are no previous elements.
        See Also:
        hasPrevious()
      • previousIndex

        int previousIndex()
        Returns the index of the previous object in the iteration.
        Returns:
        the index of the previous object, or -1 if the iterator is at the beginning.
        Throws:
        NoSuchElementException - if there are no previous elements.
        See Also:
        previous()
      • remove

        void remove()
        Removes the last object returned by next or previous from the list.
        Specified by:
        remove in interface Iterator<E>
        Throws:
        UnsupportedOperationException - if removing is not supported by the list being iterated.
        IllegalStateException - if next or previous have not been called, or remove or add have already been called after the last call to next or previous.
      • set

        void set(E object)
        Replaces the last object returned by next or previous with the specified object.
        Parameters:
        object - the object to set.
        Throws:
        UnsupportedOperationException - if setting is not supported by the list being iterated
        ClassCastException - if the class of the object is inappropriate for the list.
        IllegalArgumentException - if the object cannot be added to the list.
        IllegalStateException - if next or previous have not been called, or remove or add have already been called after the last call to next or previous.


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: 15965 / . Delta: 0.01761 с