org.drools.repository
Class AssetItemIterator

java.lang.Object
  extended by 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.


Constructor Summary
AssetItemIterator(javax.jcr.NodeIterator nodes, RulesRepository repo)
           
 
Method Summary
 long getPosition()
          Get the position in the result set.
 long getSize()
           
 boolean hasNext()
           
 AssetItem next()
           
 void remove()
           
 void skip(long i)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssetItemIterator

public AssetItemIterator(javax.jcr.NodeIterator nodes,
                         RulesRepository repo)
Method Detail

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-2011 JBoss Inc.. All Rights Reserved.