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>,java.io.Closeable,java.lang.AutoCloseable,java.util.Iterator<E>
public final class IntervalVcfIt<E extends MarkerContainer> extends java.lang.Object implements SampleFileIt<E>
Class
IntervalVcfIteratoris a sample file iterator whosenext()method returns a marker container.
-
-
Constructor Summary
Constructors Constructor Description IntervalVcfIt(SampleFileIt<E> it, ChromInterval interval)Constructs a newIntervalVcfIteratorinstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Terminates the iteration and releases any system resources that are held by this object.java.io.Filefile()Returns the file from which the data are read, ornullif the data are read from standard input or are computed data.booleanhasNext()Returnstrueif the iteration has more elements.Enext()Returns the next element in the iteration.voidremove()Theremovemethod is not supported by this iterator.Samplessamples()Returns the list of samples.
-
-
-
Constructor Detail
-
IntervalVcfIt
public IntervalVcfIt(SampleFileIt<E> it, ChromInterval interval)
Constructs a newIntervalVcfIteratorinstance.- Parameters:
it- an iterator whosenext()method returns a marker containerinterval- a chromosome interval- Throws:
java.lang.NullPointerException- ifit == null || interval == null
-
-
Method Detail
-
file
public java.io.File file()
Description copied from interface:FileItReturns the file from which the data are read, ornullif the data are read from standard input or are computed data.- 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 are computed data
-
samples
public Samples 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 interfacejava.util.Iterator<E extends MarkerContainer>- Returns:
trueif the iteration has more elements.
-
next
public E next()
Returns the next element in the iteration.- Specified by:
nextin interfacejava.util.Iterator<E extends MarkerContainer>- Returns:
- the next element in the iteration.
- Throws:
java.util.NoSuchElementException- if the iteration has no more elements.
-
remove
public void remove()
Theremovemethod is not supported by this iterator.- Specified by:
removein interfacejava.util.Iterator<E extends MarkerContainer>- Throws:
java.lang.UnsupportedOperationException- if this method is invoked
-
close
public void close()
Description copied from interface:FileItTerminates the iteration and releases any system resources that are held by this object. After invokingclose(), further invocations ofclose()have no effect.- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Specified by:
closein interfaceFileIt<E extends MarkerContainer>
-
-