org.drools.repository
Class PackageHistoryIterator
java.lang.Object
org.drools.repository.PackageHistoryIterator
- All Implemented Interfaces:
- Iterator<PackageItem>
public class PackageHistoryIterator
- extends Object
- implements Iterator<PackageItem>
A lazy iterator for walking back through history.
Wraps the version iterator from JCR and allows skipping.
Method Summary |
boolean |
hasNext()
|
PackageItem |
next()
|
void |
remove()
You can't do this with this sort of iterator. |
void |
skip(int i)
Skip the specified number of items. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PackageHistoryIterator
public PackageHistoryIterator(RulesRepository repo,
javax.jcr.Node head)
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interface Iterator<PackageItem>
next
public PackageItem next()
- Specified by:
next
in interface Iterator<PackageItem>
remove
public void remove()
- You can't do this with this sort of iterator.
It makes no sense to remove a history item.
Removing history is a administrative function only (and in
any case, it may have to be archived for legal reasons).
- Specified by:
remove
in interface Iterator<PackageItem>
- Throws:
UnsupportedOperationException
- when called.
skip
public void skip(int i)
- Skip the specified number of items. As this is a lazy iterator this
means less work in pulling it from the database etc.
Copyright © 2001-2012 JBoss by Red Hat. All Rights Reserved.