Class CircularArrayBuffer.ListIteratorImpl<E>

  • All Implemented Interfaces:
    java.util.Iterator<E>, java.util.ListIterator<E>
    Enclosing class:
    CircularArrayBuffer<E>

    protected static class CircularArrayBuffer.ListIteratorImpl<E>
    extends java.lang.Object
    implements java.util.ListIterator<E>
    • Field Detail

      • size

        protected final int size
      • startIndex

        protected final int startIndex
    • Constructor Detail

      • ListIteratorImpl

        protected ListIteratorImpl​(CircularBuffer<E> buff,
                                   int startIndex)
    • Method Detail

      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator<E>
        Specified by:
        hasNext in interface java.util.ListIterator<E>
      • next

        public final E next()
        Specified by:
        next in interface java.util.Iterator<E>
        Specified by:
        next in interface java.util.ListIterator<E>
      • remove

        public final void remove()
        Specified by:
        remove in interface java.util.Iterator<E>
        Specified by:
        remove in interface java.util.ListIterator<E>
        Throws:
        java.lang.UnsupportedOperationException - always, as far as remove is not supported
      • hasPrevious

        public boolean hasPrevious()
        Specified by:
        hasPrevious in interface java.util.ListIterator<E>
      • previous

        public final E previous()
        Specified by:
        previous in interface java.util.ListIterator<E>
      • nextIndex

        public int nextIndex()
        Specified by:
        nextIndex in interface java.util.ListIterator<E>
      • previousIndex

        public int previousIndex()
        Specified by:
        previousIndex in interface java.util.ListIterator<E>
      • set

        public void set​(E e)
                 throws java.lang.IndexOutOfBoundsException
        Specified by:
        set in interface java.util.ListIterator<E>
        Throws:
        java.lang.IndexOutOfBoundsException
      • add

        public final void add​(E e)
                       throws java.lang.UnsupportedOperationException
        Specified by:
        add in interface java.util.ListIterator<E>
        Throws:
        java.lang.UnsupportedOperationException - always, as far as inserting an element is not supported