Class Difference.ArrayIterator<T>

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

    public static class Difference.ArrayIterator<T>
    extends java.lang.Object
    implements java.util.ListIterator<T>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) java.util.ListIterator<T> iterator  
    • Constructor Summary

      Constructors 
      Constructor Description
      ArrayIterator​(java.util.List<T> elements)  
      ArrayIterator​(java.util.List<T> elements, int index)  
    • Field Detail

      • iterator

        java.util.ListIterator<T> iterator
    • Constructor Detail

      • ArrayIterator

        public ArrayIterator​(java.util.List<T> elements)
      • ArrayIterator

        public ArrayIterator​(java.util.List<T> elements,
                             int index)
    • Method Detail

      • hasNext

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

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

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

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

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

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

        public int index()
      • remove

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

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

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