Package htsjdk.samtools.util
Class DelegatingIterator<T>
- java.lang.Object
-
- htsjdk.samtools.util.DelegatingIterator<T>
-
- All Implemented Interfaces:
CloseableIterator<T>
,Closeable
,AutoCloseable
,Iterator<T>
public class DelegatingIterator<T> extends Object implements CloseableIterator<T>
Simple iterator class that delegates all method calls to an underlying iterator. Useful for in-line subclassing to add behaviour to one or more methods.
-
-
Constructor Summary
Constructors Constructor Description DelegatingIterator(Iterator<T> iterator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Should be implemented to close/release any underlying resources.boolean
hasNext()
T
next()
void
remove()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface htsjdk.samtools.util.CloseableIterator
stream, toList
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Method Detail
-
close
public void close()
Description copied from interface:CloseableIterator
Should be implemented to close/release any underlying resources.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceCloseableIterator<T>
-
-