|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jackrabbit.core.LazyItemIterator
public class LazyItemIterator
LazyItemIterator
is an id-based iterator that instantiates
the Item
s only when they are requested.
Item
s that appear to be nonexistent
for some reason (e.g. because of insufficient access rights or because they
have been removed since the iterator has been retrieved) are silently
skipped. As a result the size of the iterator as reported by
getSize()
might appear to be shrinking while iterating over the
items.
todo should getSize() better always return -1?
getSize()
Constructor Summary | |
---|---|
LazyItemIterator(SessionContext sessionContext,
List<? extends ItemId> idList)
Creates a new LazyItemIterator instance. |
|
LazyItemIterator(SessionContext sessionContext,
List<? extends ItemId> idList,
NodeId parentId)
Creates a new LazyItemIterator instance, additionally taking
a parent id as parameter. |
Method Summary | |
---|---|
long |
getPosition()
|
long |
getSize()
Note that the size of the iterator as reported by getSize()
might appear to be shrinking while iterating because items that for
some reason cannot be retrieved through this iterator are silently
skipped, thus reducing the size of this iterator. |
boolean |
hasNext()
|
Object |
next()
|
Node |
nextNode()
|
Property |
nextProperty()
|
void |
remove()
|
void |
skip(long skipNum)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LazyItemIterator(SessionContext sessionContext, List<? extends ItemId> idList)
LazyItemIterator
instance.
sessionContext
- session contextidList
- list of item id'spublic LazyItemIterator(SessionContext sessionContext, List<? extends ItemId> idList, NodeId parentId)
LazyItemIterator
instance, additionally taking
a parent id as parameter. This version should be invoked to strictly return
children nodes of a node.
sessionContext
- session contextidList
- list of item id'sparentId
- parent id.Method Detail |
---|
public Node nextNode()
nextNode
in interface NodeIterator
public Property nextProperty()
nextProperty
in interface PropertyIterator
public long getPosition()
getPosition
in interface RangeIterator
public long getSize()
getSize()
might appear to be shrinking while iterating because items that for
some reason cannot be retrieved through this iterator are silently
skipped, thus reducing the size of this iterator.
todo better to always return -1?
getSize
in interface RangeIterator
public void skip(long skipNum)
skip
in interface RangeIterator
public boolean hasNext()
hasNext
in interface Iterator
public Object next()
next
in interface Iterator
public void remove()
remove
in interface Iterator
UnsupportedOperationException
- always since not implemented
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |