Class IteratorItemStatsImpl<ITEM>
java.lang.Object
com.foreach.across.modules.web.ui.IteratorItemStatsImpl<ITEM>
- All Implemented Interfaces:
IteratorItemStats<ITEM>
Represents some contextual information about an item that is part of an iterable like collection.
Keeps track of the item itself, its index and next/previous information.
- Author:
- Arne Vandamme
-
Constructor Summary
ConstructorDescriptionIteratorItemStatsImpl
(ITEM item, int index, boolean last) IteratorItemStatsImpl
(ITEM item, int index, boolean first, boolean last) -
Method Summary
-
Constructor Details
-
IteratorItemStatsImpl
-
IteratorItemStatsImpl
-
-
Method Details
-
getIndex
public int getIndex()- Specified by:
getIndex
in interfaceIteratorItemStats<ITEM>
- Returns:
- Index of the item in the collection.
-
hasPrevious
public boolean hasPrevious()- Specified by:
hasPrevious
in interfaceIteratorItemStats<ITEM>
- Returns:
- True if there are previous items in the collection.
-
isFirst
public boolean isFirst()- Specified by:
isFirst
in interfaceIteratorItemStats<ITEM>
- Returns:
- True if this item is the first one in the collection.
-
hasNext
public boolean hasNext()- Specified by:
hasNext
in interfaceIteratorItemStats<ITEM>
- Returns:
- True if there are more items in the collection after this one.
-
isLast
public boolean isLast()- Specified by:
isLast
in interfaceIteratorItemStats<ITEM>
- Returns:
- True if this item is the last item in the collection.
-
getItem
- Specified by:
getItem
in interfaceIteratorItemStats<ITEM>
- Returns:
- item itself
-