Class ArrayIteratorAdapter<T>
- java.lang.Object
-
- org.apache.wicket.markup.repeater.util.ArrayIteratorAdapter<T>
-
- Type Parameters:
T
- type of array element
- All Implemented Interfaces:
java.util.Iterator<IModel<T>>
public abstract class ArrayIteratorAdapter<T> extends java.lang.Object implements java.util.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
-
-
-
Constructor Detail
-
ArrayIteratorAdapter
public ArrayIteratorAdapter(T[] array)
Constructor- Parameters:
array
-
-
-
Method Detail
-
remove
public void remove()
- Specified by:
remove
in interfacejava.util.Iterator<T>
- See Also:
Iterator.remove()
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfacejava.util.Iterator<T>
- See Also:
Iterator.hasNext()
-
next
public IModel<T> next()
- Specified by:
next
in interfacejava.util.Iterator<T>
- See Also:
Iterator.next()
-
reset
public void reset()
Resets the iterator position back to the beginning of the array
-
-