Package bref
Class Bref3It
- java.lang.Object
-
- bref.Bref3It
-
- All Implemented Interfaces:
FileIt<RefGTRec>,SampleFileIt<RefGTRec>,java.io.Closeable,java.lang.AutoCloseable,java.util.Iterator<RefGTRec>
public final class Bref3It extends java.lang.Object implements SampleFileIt<RefGTRec>
Class
Bref3Itrepresents an iterator whosenext()which returns records from a bref version 3 file.Instances of class
Bref3Itare not thread-safe.Methods of this class will terminate the Java Virtual Machine with an error message if an I/O error or file format error is detected.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Stops reading data elements 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 if the data source is unknown.booleanhasNext()Returnstrueif the iteration has more elements, and returnsfalseotherwise.RefGTRecnext()Returns the next element in the iteration.Samplessamples()Returns the list of samples.java.lang.StringtoString()Returns a string representation ofthis.
-
-
-
Constructor Detail
-
Bref3It
public Bref3It(java.io.File brefFile)
Constructs a newBref3Itinstance.- Parameters:
brefFile- a bref version 3 file ornullif the bref version 3 file is to be read from standard input- Throws:
java.lang.IllegalArgumentException- if a format error is detected in a line of the specified bref file
-
Bref3It
public Bref3It(java.io.File brefFile, Filter<Marker> markerFilter)Constructs a newBref4Itinstance.- Parameters:
brefFile- a bref v4 filemarkerFilter- a marker filter ornull- Throws:
java.lang.IllegalArgumentException- if a format error is detected in a line of the specified bref v3 filejava.lang.NullPointerException- iffile == null
-
-
Method Detail
-
hasNext
public boolean hasNext()
Returnstrueif the iteration has more elements, and returnsfalseotherwise.- Specified by:
hasNextin interfacejava.util.Iterator<RefGTRec>- Returns:
trueif the iteration has more elements
-
next
public RefGTRec next()
Returns the next element in the iteration.- Specified by:
nextin interfacejava.util.Iterator<RefGTRec>- Returns:
- the next element in the iteration
- Throws:
java.util.NoSuchElementException- if the iteration has no more elements
-
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.
-
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 if the data source is unknown.
-
samples
public Samples samples()
Description copied from interface:SampleFileItReturns the list of samples.- Specified by:
samplesin interfaceSampleFileIt<RefGTRec>- Returns:
- the list of samples
-
toString
public java.lang.String toString()
Description copied from interface:FileItReturns a string representation ofthis. The exact details of the representation are unspecified and subject to change.
-
-