org.drools.repository
Class AssetItemIterator
java.lang.Object
org.drools.repository.AssetItemIterator
- All Implemented Interfaces:
- Iterator<AssetItem>
- Direct Known Subclasses:
- VersionedAssetItemIterator
public class AssetItemIterator
- extends Object
- implements Iterator<AssetItem>
This iterates over nodes and produces RuleItem's.
Also allows "skipping" of results to jump to certain items,
as per JCRs "skip".
JCR iterators are/can be lazy, so this makes the most of it for large
numbers of assets.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
it
protected javax.jcr.NodeIterator it
rulesRepository
protected RulesRepository rulesRepository
AssetItemIterator
public AssetItemIterator(javax.jcr.NodeIterator nodes,
RulesRepository repo)
AssetItemIterator
public AssetItemIterator(AssetItemIterator assetItemIterator)
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interface Iterator<AssetItem>
next
public AssetItem next()
- Specified by:
next
in interface Iterator<AssetItem>
remove
public void remove()
- Specified by:
remove
in interface Iterator<AssetItem>
skip
public void skip(long i)
- Parameters:
i
- The number of rules to skip.
getSize
public long getSize()
- Returns:
- the size of the underlying iterator's potential data set.
May be -1 if not known.
getPosition
public long getPosition()
- Get the position in the result set.
Copyright © 2001-2012 JBoss by Red Hat. All Rights Reserved.