Class IList.Iter

java.lang.Object
org.magicwerk.brownies.collections.IList.Iter
All Implemented Interfaces:
Iterator<E>
Enclosing class:
IList<E>

class IList.Iter extends Object implements Iterator<E>
Iterator supports forward and reverse iteration.
  • Field Details

    • forward

      boolean forward
      true if iterator moves forward
    • index

      int index
      current index
    • remove

      int remove
      index where element will be removed if remove() is called
  • Constructor Details

    • Iter

      public Iter(boolean forward)
      Constructor.
      Parameters:
      forward - true for forward access
  • Method Details

    • hasNext

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

      public E next()
      Specified by:
      next in interface Iterator<E>
    • remove

      public void remove()
      Specified by:
      remove in interface Iterator<E>