Class ReadOnlyList.ReadOnlyCollectionIterator<T>

  • All Implemented Interfaces:
    java.util.Iterator<T>, java.util.ListIterator<T>
    Enclosing class:
    ReadOnlyList<T>

    private static class ReadOnlyList.ReadOnlyCollectionIterator<T>
    extends java.lang.Object
    implements java.util.ListIterator<T>
    • Field Detail

      • _position

        private int _position
    • Constructor Detail

      • ReadOnlyCollectionIterator

        ReadOnlyCollectionIterator​(ReadOnlyList<T> list)
      • ReadOnlyCollectionIterator

        ReadOnlyCollectionIterator​(ReadOnlyList<T> list,
                                   int startPosition)
    • Method Detail

      • hasNext

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

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

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

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

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

        public final int previousIndex()
        Specified by:
        previousIndex in interface java.util.ListIterator<T>
      • remove

        public final void remove()
        Specified by:
        remove in interface java.util.Iterator<T>
        Specified by:
        remove in interface java.util.ListIterator<T>
      • set

        public final void set​(T T)
        Specified by:
        set in interface java.util.ListIterator<T>
      • add

        public final void add​(@NotNull
                              T T)
        Specified by:
        add in interface java.util.ListIterator<T>