Package vcf
Class IntervalVcfIt<E extends MarkerContainer>
java.lang.Object
vcf.IntervalVcfIt<E>
- Type Parameters:
E- the type parameter
- All Implemented Interfaces:
FileIt<E>,SampleFileIt<E>,Closeable,AutoCloseable,Iterator<E>
public final class IntervalVcfIt<E extends MarkerContainer>
extends Object
implements SampleFileIt<E>
Class IntervalVcfIterator is a sample file iterator whose
next() method returns a marker container.
-
Constructor Summary
ConstructorsConstructorDescriptionIntervalVcfIt(SampleFileIt<E> it, ChromInterval chromInt) Constructs a newIntervalVcfIteratorinstance. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Stops reading data elements and releases any system resources that are held by this object.file()Returns the file from which the data are read, ornullif the data are read from standard input or if the data source is unknown.booleanhasNext()Returnstrueif the iteration has more elements.next()Returns the next element in the iteration.voidremove()Theremovemethod is not supported by this iterator.samples()Returns the list of samples.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining
-
Constructor Details
-
IntervalVcfIt
Constructs a newIntervalVcfIteratorinstance.- Parameters:
it- an iterator whosenext()method returns a marker containerchromInt- a chromosome interval- Throws:
NullPointerException- ifit == null || interval == null
-
-
Method Details
-
file
Description copied from interface:FileItReturns the file from which the data are read, ornullif the data are read from standard input or if the data source is unknown.- Specified by:
filein interfaceFileIt<E extends MarkerContainer>- Returns:
- the file from which the data are read, or
nullif the data are read from standard input or if the data source is unknown
-
samples
Description copied from interface:SampleFileItReturns the list of samples.- Specified by:
samplesin interfaceSampleFileIt<E extends MarkerContainer>- Returns:
- the list of samples
-
hasNext
public boolean hasNext()Returnstrueif the iteration has more elements.- Specified by:
hasNextin interfaceIterator<E extends MarkerContainer>- Returns:
trueif the iteration has more elements.
-
next
Returns the next element in the iteration.- Specified by:
nextin interfaceIterator<E extends MarkerContainer>- Returns:
- the next element in the iteration.
- Throws:
NoSuchElementException- if the iteration has no more elements.
-
remove
public void remove()Theremovemethod is not supported by this iterator.- Specified by:
removein interfaceIterator<E extends MarkerContainer>- Throws:
UnsupportedOperationException- if this method is invoked
-
close
public void close()Description copied from interface:FileItStops reading data elements and releases any system resources that are held by this object. Buffered data elements may remain accessible via thehasNext()andnext()methods after invokingclose(). After invokingclose(), further invocations ofclose()have no effect.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceFileIt<E extends MarkerContainer>
-