Class IterableOnceIterator<T>
java.lang.Object
htsjdk.samtools.util.IterableOnceIterator<T>
- All Implemented Interfaces:
Closeable, AutoCloseable, Iterable<T>, Iterator<T>
- Direct Known Subclasses:
SamLocusAndReferenceIterator
public abstract class IterableOnceIterator<T>
extends Object
implements Iterable<T>, Iterator<T>, Closeable
Abstract implementation of an iterator that also implements Iterable (to return itself)
so that it can be used if for() loops. Only supports calling iterator() once since new
iterators are not manufactured but the same object returned.
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Iterable
forEach, spliteratorMethods inherited from interface Iterator
forEachRemaining, hasNext, next
-
Constructor Details
-
IterableOnceIterator
public IterableOnceIterator()
-
-
Method Details
-
iterator
-
remove
-
close
Does nothing, intended to be overridden when needed.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-