org.apache.commons.collections.list

## Class AbstractLinkedList.LinkedSubListIterator

- java.lang.Object
- - org.apache.commons.collections.list.AbstractLinkedList.LinkedListIterator
  - - org.apache.commons.collections.list.AbstractLinkedList.LinkedSubListIterator

- All Implemented Interfaces:
    Iterator, ListIterator, OrderedIterator
  Enclosing class:
    AbstractLinkedList

      protected static class AbstractLinkedList.LinkedSubListIterator
      extends AbstractLinkedList.LinkedListIterator

  A list iterator over the linked sub list.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected AbstractLinkedList.LinkedSubList` | `sub` The parent list

    - ### Fields inherited from class org.apache.commons.collections.list.AbstractLinkedList.LinkedListIterator

      `current, expectedModCount, next, nextIndex, parent`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `AbstractLinkedList.LinkedSubListIterator(AbstractLinkedList.LinkedSubList sub, int startIndex)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(Object obj)`
    `boolean` | `hasNext()`
    `boolean` | `hasPrevious()` Checks to see if there is a previous element that can be iterated to.
    `int` | `nextIndex()`
    `void` | `remove()`

    - ### Methods inherited from class org.apache.commons.collections.list.AbstractLinkedList.LinkedListIterator

      `checkModCount, getLastNodeReturned, next, previous, previousIndex, set`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### sub

          protected final AbstractLinkedList.LinkedSubList sub

      The parent list

  - ### Constructor Detail

    - #### AbstractLinkedList.LinkedSubListIterator

          protected AbstractLinkedList.LinkedSubListIterator(AbstractLinkedList.LinkedSubList sub,
                                                  int startIndex)

  - ### Method Detail

    - #### hasNext

          public boolean hasNext()

      Specified by:
        `hasNext` in interface `Iterator`
      Specified by:
        `hasNext` in interface `ListIterator`
      Overrides:
        `hasNext` in class `AbstractLinkedList.LinkedListIterator`

    - #### hasPrevious

          public boolean hasPrevious()

      Description copied from interface: `OrderedIterator`
      Checks to see if there is a previous element that can be iterated to.
      Specified by:
        `hasPrevious` in interface `ListIterator`
      Specified by:
        `hasPrevious` in interface `OrderedIterator`
      Overrides:
        `hasPrevious` in class `AbstractLinkedList.LinkedListIterator`
      Returns:
        `true` if the iterator has a previous element

    - #### nextIndex

          public int nextIndex()

      Specified by:
        `nextIndex` in interface `ListIterator`
      Overrides:
        `nextIndex` in class `AbstractLinkedList.LinkedListIterator`

    - #### add

          public void add(Object obj)

      Specified by:
        `add` in interface `ListIterator`
      Overrides:
        `add` in class `AbstractLinkedList.LinkedListIterator`

    - #### remove

          public void remove()

      Specified by:
        `remove` in interface `Iterator`
      Specified by:
        `remove` in interface `ListIterator`
      Overrides:
        `remove` in class `AbstractLinkedList.LinkedListIterator`

Copyright © 2001–2015 The Apache Software Foundation. All rights reserved.