public abstract class AbstractItemIterator extends java.lang.Object implements java.util.Iterator<AbstractItem>
AbstractItem.| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractItemIterator.AbstractBuilder<BuilderType extends AbstractItemIterator.AbstractBuilder<?,ProductType>,ProductType extends AbstractItemIterator>
An abstract base class of all builders, which allows to configure and create instances of the
class
AbstractItemIterator. |
| Constructor and Description |
|---|
AbstractItemIterator() |
| Modifier and Type | Method and Description |
|---|---|
AbstractItem |
first()
Returns the first item.
|
abstract int |
getCount()
The method, which is invoked on subclasses in order to retrieve the total number of available
items.
|
abstract AbstractItem |
getItem(int index)
The method, which is invoked on subclasses in order to retrieve the item, which corresponds
to a specific index.
|
boolean |
hasNext() |
protected void |
initialize(boolean reverse,
int start)
Initializes the iterator.
|
AbstractItem |
next() |
AbstractItem |
peek()
Returns the next item.
|
AbstractItem |
previous()
Returns the previous item.
|
public abstract int getCount()
Integer valuepublic abstract AbstractItem getItem(int index)
index - The index of the item, which should be returned, as an Integer valueAbstractItem. The item may not be nullprotected final void initialize(boolean reverse,
int start)
reverse - True, if the items should be iterated in reverse order, false otherwisestart - The index of the first item, which should be iterated, as an Integer value or
-1, if all items should be iteratedpublic final AbstractItem first()
AbstractItem or null, if no items
are availablepublic final AbstractItem previous()
AbstractItem or null, if no
previous item is availablepublic final AbstractItem peek()
AbstractItem or null, if no next
item is availablepublic final boolean hasNext()
hasNext in interface java.util.Iterator<AbstractItem>public final AbstractItem next()
next in interface java.util.Iterator<AbstractItem>