|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface HippoBeanIterator
A lazy proxied iterator, that only fetches the next bean when asked for it. As we fetch the beans lazily, this iterator is very efficient. For performance reasons, it is really important to use skip(int skipNum) if you know where you would like to start iterating from.
Method Summary | |
---|---|
long |
getPosition()
Returns the current position within the iterator. |
long |
getSize()
Returns the number of elements in the iterator. |
HippoBean |
nextHippoBean()
Returns the next HippoBean in the iteration. |
void |
skip(int skipNum)
Skip a number of elements in the iterator. |
Methods inherited from interface java.util.Iterator |
---|
hasNext, next, remove |
Method Detail |
---|
HippoBean nextHippoBean()
HippoBean
in the iteration. Note this method is allowed to return null
when the backing jcr node cannot be mapped to a HippoBean.
HippoBean
in the iteration or null
if the jcr node cannot be mapped
to a HippoBean
NoSuchElementException
- if iteration has no more HippoBean
s.void skip(int skipNum)
skipNum
- the non-negative number of elements to skip
NoSuchElementException
- if skipped past the last element in the iterator.long getSize()
long getPosition()
next
call.
Note that this method does not check if there is a next element,
i.e. an empty iterator will always return 0.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |