com.hp.hpl.jena.util.iterator
Class NiceIterator

java.lang.Object
  extended bycom.hp.hpl.jena.util.iterator.NiceIterator
All Implemented Interfaces:
ClosableIterator, ExtendedIterator, java.util.Iterator
Direct Known Subclasses:
ConcatIteratorList, MapFilterIterator, MapMany, SingletonIterator, WrappedIterator

public class NiceIterator
extends java.lang.Object
implements ExtendedIterator

Author:
kers
A NiceIterator is an abstract class implementing ClosableIterator, which is about to become more complicated ...

Constructor Summary
NiceIterator()
           
 
Method Summary
 ExtendedIterator andThen(ClosableIterator other)
          make a new iterator, which is us then the other chap.
static ExtendedIterator andThen(ClosableIterator a, ClosableIterator b)
          concatenate two closable iterators.
 void close()
          default close: don't need to do anything.
 ExtendedIterator filterDrop(Filter f)
          make a new iterator, which is our elements that pass the filter
 ExtendedIterator filterKeep(Filter f)
          make a new iterator, which is our elements that pass the filter
 boolean hasNext()
          default hasNext: no elements, return false.
 ExtendedIterator mapWith(Map1 map1)
          make a new iterator which is the elementwise _map1_ of the base iterator.
 java.lang.Object next()
          default next: throw an exception.
 void remove()
          default remove: we have no elements, so we can't remove any.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NiceIterator

public NiceIterator()
Method Detail

close

public void close()
default close: don't need to do anything.

Specified by:
close in interface ClosableIterator

hasNext

public boolean hasNext()
default hasNext: no elements, return false.

Specified by:
hasNext in interface java.util.Iterator

next

public java.lang.Object next()
default next: throw an exception.

Specified by:
next in interface java.util.Iterator

remove

public void remove()
default remove: we have no elements, so we can't remove any.

Specified by:
remove in interface java.util.Iterator

andThen

public static ExtendedIterator andThen(ClosableIterator a,
                                       ClosableIterator b)
concatenate two closable iterators.


andThen

public ExtendedIterator andThen(ClosableIterator other)
make a new iterator, which is us then the other chap.

Specified by:
andThen in interface ExtendedIterator

filterKeep

public ExtendedIterator filterKeep(Filter f)
make a new iterator, which is our elements that pass the filter

Specified by:
filterKeep in interface ExtendedIterator

filterDrop

public ExtendedIterator filterDrop(Filter f)
make a new iterator, which is our elements that pass the filter

Specified by:
filterDrop in interface ExtendedIterator

mapWith

public ExtendedIterator mapWith(Map1 map1)
make a new iterator which is the elementwise _map1_ of the base iterator.

Specified by:
mapWith in interface ExtendedIterator


Copyright © 2001-2003 Hewlett-Packard. All Rights Reserved.