Package bref
Class Bref3It
java.lang.Object
bref.Bref3It
- All Implemented Interfaces:
FileIt<RefGTRec>
,SampleFileIt<RefGTRec>
,Closeable
,AutoCloseable
,Iterator<RefGTRec>
Class Bref3It
represents an iterator whose next()
which
returns records from a bref version 3 file.
Instances of class Bref3It
are 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.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
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, ornull
if the data are read from standard input or if the data source is unknown.boolean
hasNext()
Returnstrue
if the iteration has more elements, and returnsfalse
otherwise.next()
Returns the next element in the iteration.samples()
Returns the list of samples.toString()
Returns a string representation ofthis
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Constructor Details
-
Bref3It
Constructs a newBref3It
instance.- Parameters:
brefFile
- a bref version 3 file ornull
if the bref version 3 file is to be read from standard input- Throws:
IllegalArgumentException
- if a format error is detected in a line of the specified bref file
-
Bref3It
Constructs a newBref4It
instance.- Parameters:
brefFile
- a bref v4 filemarkerFilter
- a marker filter ornull
- Throws:
IllegalArgumentException
- if a format error is detected in a line of the specified bref v3 fileNullPointerException
- iffile == null
-
-
Method Details
-
hasNext
public boolean hasNext()Returnstrue
if the iteration has more elements, and returnsfalse
otherwise. -
next
Returns the next element in the iteration.- Specified by:
next
in interfaceIterator<RefGTRec>
- Returns:
- the next element in the iteration
- Throws:
NoSuchElementException
- if the iteration has no more elements
-
close
public void close()Description copied from interface:FileIt
Stops 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
Description copied from interface:FileIt
Returns the file from which the data are read, ornull
if the data are read from standard input or if the data source is unknown. -
samples
Description copied from interface:SampleFileIt
Returns the list of samples.- Specified by:
samples
in interfaceSampleFileIt<RefGTRec>
- Returns:
- the list of samples
-
toString
Description copied from interface:FileIt
Returns a string representation ofthis
. The exact details of the representation are unspecified and subject to change.
-