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

java.lang.Object
  extended by com.hp.hpl.jena.util.iterator.NiceIterator
      extended by com.hp.hpl.jena.util.iterator.MapFilterIterator
All Implemented Interfaces:
ClosableIterator, ExtendedIterator, Iterator

public class MapFilterIterator
extends NiceIterator
implements ExtendedIterator

A MapFilterIterator takes a MapFilter and an [Extended]Iterator and returns a new ExtendedIterator which delivers the sequence of all non-null elements MapFilter(X) for X from the base iterator.

Author:
kers

Constructor Summary
MapFilterIterator(MapFilter fl, ExtendedIterator e)
          Creates a sub-Iterator.
 
Method Summary
 void close()
          default close: don't need to do anything.
 boolean hasNext()
          Are there any more acceptable objects.
 Object next()
          The next acceptable object in the iterator.
 void remove()
          remove's the member from the underlying Iterator; hasNext() may not be called between calls to next() and remove().
 
Methods inherited from class com.hp.hpl.jena.util.iterator.NiceIterator
andThen, andThen, close, filterDrop, filterKeep, mapWith, removeNext
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.hp.hpl.jena.util.iterator.ExtendedIterator
andThen, filterDrop, filterKeep, mapWith, removeNext
 

Constructor Detail

MapFilterIterator

public MapFilterIterator(MapFilter fl,
                         ExtendedIterator e)
Creates a sub-Iterator.

Parameters:
fl - An object is included if it is accepted by this Filter.
e - The parent Iterator.
Method Detail

hasNext

public boolean hasNext()
Are there any more acceptable objects.

Specified by:
hasNext in interface Iterator
Overrides:
hasNext in class NiceIterator
Returns:
true if there is another acceptable object.

close

public void close()
Description copied from class: NiceIterator
default close: don't need to do anything.

Specified by:
close in interface ClosableIterator
Overrides:
close in class NiceIterator

remove

public void remove()
remove's the member from the underlying Iterator; hasNext() may not be called between calls to next() and remove().

Specified by:
remove in interface Iterator
Overrides:
remove in class NiceIterator

next

public Object next()
The next acceptable object in the iterator.

Specified by:
next in interface Iterator
Overrides:
next in class NiceIterator
Returns:
The next acceptable object.


Copyright © 2000, 2001, 2002, 2003, 2004 Hewlett-Packard Development Company, LP