Class ArrayIteratorAdapter<T>
- java.lang.Object
-
- org.apache.wicket.markup.repeater.util.ArrayIteratorAdapter<T>
-
- Type Parameters:
T
- type of array element
public abstract class ArrayIteratorAdapter<T> extends Object implements Iterator<IModel<T>>
Iterator over an array. Implementation must providemodel(Object)
method to wrap each item in a model before it is returned throughnext()
method.- Author:
- Igor Vaynberg (ivaynberg)
-
-
Constructor Summary
Constructors Constructor Description ArrayIteratorAdapter(T[] array)
Constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
protected abstract IModel<T>
model(T object)
This method is used to wrap the provided object with an implementation of IModel.IModel<T>
next()
void
remove()
void
reset()
Resets the iterator position back to the beginning of the array-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Constructor Detail
-
ArrayIteratorAdapter
public ArrayIteratorAdapter(T[] array)
Constructor- Parameters:
array
-
-
-
Method Detail
-
remove
public void remove()
- Specified by:
remove
in interfaceIterator<T>
- See Also:
Iterator.remove()
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfaceIterator<T>
- See Also:
Iterator.hasNext()
-
reset
public void reset()
Resets the iterator position back to the beginning of the array
-
-