Class ArrayIteratorAdapter<T>

Type Parameters:
T - type of array element
All Implemented Interfaces:

public abstract class ArrayIteratorAdapter<T> extends Object implements Iterator<IModel<T>>
Iterator over an array. Implementation must provide model(Object) method to wrap each item in a model before it is returned through next() method.
Igor Vaynberg (ivaynberg)
  • Constructor Details

  • Method Details

    • remove

      public void remove()
      Specified by:
      remove in interface Iterator<T>
      See Also:
    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface Iterator<T>
      See Also:
    • next

      public IModel<T> next()
      Specified by:
      next in interface Iterator<T>
      See Also:
    • reset

      public void reset()
      Resets the iterator position back to the beginning of the array
    • model

      protected abstract IModel<T> model(T object)
      This method is used to wrap the provided object with an implementation of IModel. The provided object is guaranteed to be returned from the delegate iterator.
      object - object to be wrapped
      IModel wrapper for the object