org.databene.commons.iterator
Class HeavyweightIteratorAdapter<S,P>

java.lang.Object
  extended by org.databene.commons.iterator.HeavyweightIteratorAdapter<S,P>
All Implemented Interfaces:
java.io.Closeable, java.util.Iterator<P>, HeavyweightIterator<P>
Direct Known Subclasses:
CSVSingleColumIterator, HeavyweightIteratorProxy

public abstract class HeavyweightIteratorAdapter<S,P>
extends java.lang.Object
implements HeavyweightIterator<P>

Wraps an Iterator with a HeavyweightIterator. If the wrapped iterator implements Closeable, calls to close() are forwarded, otherwise ignored
.
Created at 17.10.2008 01:27:08

Since:
0.4.6
Author:
Volker Bergmann

Field Summary
protected  java.util.Iterator<S> source
           
 
Constructor Summary
HeavyweightIteratorAdapter(java.util.Iterator<S> source)
           
 
Method Summary
 void close()
           
 boolean hasNext()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Iterator
next
 

Field Detail

source

protected java.util.Iterator<S> source
Constructor Detail

HeavyweightIteratorAdapter

public HeavyweightIteratorAdapter(java.util.Iterator<S> source)
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator<P>

remove

public void remove()
Specified by:
remove in interface java.util.Iterator<P>

close

public void close()
Specified by:
close in interface java.io.Closeable


Copyright © 2010. All Rights Reserved.