| java.lang.Object com.hp.hpl.jena.util.iterator.NiceIterator com.hp.hpl.jena.util.iterator.WrappedIterator
All known Subclasses: com.hp.hpl.jena.rdf.model.impl.NsIteratorImpl, com.hp.hpl.jena.rdf.model.impl.NodeIteratorImpl, com.hp.hpl.jena.mem.TrackingTripleIterator, com.hp.hpl.jena.util.iterator.Map1Iterator, com.hp.hpl.jena.util.iterator.FilterIterator, com.hp.hpl.jena.rdf.model.impl.ResIteratorImpl, com.hp.hpl.jena.util.iterator.UniqueExtendedIterator, com.hp.hpl.jena.util.iterator.RandomOrderIterator, com.hp.hpl.jena.util.iterator.EarlyBindingIterator, com.hp.hpl.jena.rdf.model.impl.SeqNodeIteratorImpl, com.hp.hpl.jena.rdf.model.impl.StmtIteratorImpl, com.hp.hpl.jena.rdf.model.impl.ContNodeIteratorImpl,
WrappedIterator | public class WrappedIterator extends NiceIterator (Code) | | a WrappedIterator is an ExtendedIterator wrapping around a plain (or
presented as plain) Iterator. The wrapping allows the usual extended
operations (filtering, concatenating) to be done on an Iterator derived
from some other source.
author: kers |
Field Summary | |
final protected Iterator | base | protected boolean | removeDenied set to true if this wrapping doesn't permit the use of
.remove(). |
base | final protected Iterator base(Code) | | the base iterator that we wrap
|
removeDenied | protected boolean removeDenied(Code) | | set to true if this wrapping doesn't permit the use of
.remove(). Otherwise the .remove() is delegated to the base iterator.
|
WrappedIterator | protected WrappedIterator(Iterator base)(Code) | | constructor: remember the base iterator
|
WrappedIterator | protected WrappedIterator(Iterator base, boolean removeDenied)(Code) | | Initialise this wrapping with the given base iterator and remove-control.
Parameters: base - the base iterator that this tierator wraps Parameters: removeDenied - true if .remove() must throw an exception |
close | public void close()(Code) | | close: defer to the base, iff it is closable
|
close | public static void close(Iterator it)(Code) | | if it is a Closableiterator, close it. Abstracts away from
tests [that were] scattered through the code.
|
create | public static ExtendedIterator create(Iterator it)(Code) | | Answer an ExtendedIterator returning the elements of it .
If it is itself an ExtendedIterator, return that; otherwise
wrap it .
|
createNoRemove | public static WrappedIterator createNoRemove(Iterator it)(Code) | | Answer an ExtendedIterator wrapped round it which does not
permit .remove() even if it does.
|
hasNext | public boolean hasNext()(Code) | | hasNext: defer to the base iterator
|
next | public Object next()(Code) | | next: defer to the base iterator
|
remove | public void remove()(Code) | | if .remove() is allowed, delegate to the base iterator's .remove;
otherwise, throw an UnsupportedOperationException.
|
|
|