Class ArrayIteratorAdapter<T>

  • Type Parameters:
    T - type of array element
    All Implemented Interfaces:
    Iterator<IModel<T>>

    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.
    Author:
    Igor Vaynberg (ivaynberg)
    • Method Detail

      • reset

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

        protected abstract IModel<Tmodel​(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.
        Parameters:
        object - object to be wrapped
        Returns:
        IModel wrapper for the object