com.hp.hpl.jena.util.iterator
Class Map1Iterator<From,To>

java.lang.Object
  extended by com.hp.hpl.jena.util.iterator.NiceIterator<To>
      extended by com.hp.hpl.jena.util.iterator.Map1Iterator<From,To>
All Implemented Interfaces:
ClosableIterator<To>, ExtendedIterator<To>, java.util.Iterator<To>

public class Map1Iterator<From,To>
extends NiceIterator<To>
implements ClosableIterator<To>

An iterator that consumes an underlying iterator and maps its results before delivering them; supports remove if the underlying iterator does.

Version:
Release='$Name: Jena-2_6_4 $' Revision='$Revision: 1.2 $' Date='$Date: 2009/09/28 13:27:30 $'
Author:
jjc + kers

Constructor Summary
Map1Iterator(Map1<From,To> map, java.util.Iterator<From> base)
          Construct a list of the converted.
 
Method Summary
 void close()
          default close: don't need to do anything.
 boolean hasNext()
          default hasNext: no elements, return false.
 To next()
          default next: throw an exception.
 void remove()
          default remove: we have no elements, so we can't remove any.
 
Methods inherited from class com.hp.hpl.jena.util.iterator.NiceIterator
andThen, andThen, asList, asSet, close, emptyIterator, filterDrop, filterKeep, mapWith, removeNext, toList, toSet
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Map1Iterator

public Map1Iterator(Map1<From,To> map,
                    java.util.Iterator<From> base)
Construct a list of the converted.

Parameters:
map - The conversion to apply.
base - the iterator of elements to convert
Method Detail

next

public To next()
Description copied from class: NiceIterator
default next: throw an exception.

Specified by:
next in interface java.util.Iterator<To>
Overrides:
next in class NiceIterator<To>

hasNext

public boolean hasNext()
Description copied from class: NiceIterator
default hasNext: no elements, return false.

Specified by:
hasNext in interface java.util.Iterator<To>
Overrides:
hasNext in class NiceIterator<To>

remove

public void remove()
Description copied from class: NiceIterator
default remove: we have no elements, so we can't remove any.

Specified by:
remove in interface java.util.Iterator<To>
Overrides:
remove in class NiceIterator<To>

close

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

Specified by:
close in interface ClosableIterator<To>
Overrides:
close in class NiceIterator<To>


Copyright ? 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP