Class ModelIteratorAdapter<T>
- java.lang.Object
-
- org.apache.wicket.markup.repeater.util.ModelIteratorAdapter<T>
-
- Type Parameters:
T
-
public abstract class ModelIteratorAdapter<T> extends Object implements Iterator<IModel<T>>
Iterator adapter that wraps adaptee's elements with a model. Convenient when implementingRefreshingView
.- Author:
- Igor Vaynberg (ivaynberg)
-
-
Constructor Summary
Constructors Constructor Description ModelIteratorAdapter(Iterable<T> iterable)
ConstructorModelIteratorAdapter(Iterator<T> delegate)
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()
-
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
-
ModelIteratorAdapter
public ModelIteratorAdapter(Iterable<T> iterable)
Constructor- Parameters:
iterable
- iterable whose iterator will be wrapped
-
ModelIteratorAdapter
public ModelIteratorAdapter(Iterator<T> delegate)
Constructor- Parameters:
delegate
- iterator that will be wrapped
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfaceIterator<T>
- See Also:
Iterator.hasNext()
-
remove
public void remove()
- Specified by:
remove
in interfaceIterator<T>
- See Also:
Iterator.remove()
-
-