Package org.biojavax.bio.seq.io
Class HashedFastaIterator
java.lang.Object
org.biojavax.bio.seq.io.HashedFastaIterator
- All Implemented Interfaces:
SequenceIterator
,BioEntryIterator
,RichSequenceIterator
Iterates over a Fasta file that is kept in memory for optimized access.
- Since:
- 1.7
- Author:
- Andreas Prlic
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
hasNext()
Returns whether there are more sequences to iterate over.Returns the next sequence in the iterator.
-
Constructor Details
-
HashedFastaIterator
public HashedFastaIterator(BufferedInputStream is, Alphabet alpha, Namespace ns) throws BioException - Throws:
BioException
-
-
Method Details
-
nextRichSequence
- Specified by:
nextRichSequence
in interfaceRichSequenceIterator
- Throws:
NoSuchElementException
BioException
-
hasNext
Description copied from interface:BioEntryIterator
Returns whether there are more sequences to iterate over.- Specified by:
hasNext
in interfaceBioEntryIterator
- Specified by:
hasNext
in interfaceSequenceIterator
- Returns:
- true if there are more sequences to get and false otherwise
-
nextBioEntry
- Specified by:
nextBioEntry
in interfaceBioEntryIterator
- Throws:
NoSuchElementException
BioException
-
nextSequence
Description copied from interface:SequenceIterator
Returns the next sequence in the iterator.- Specified by:
nextSequence
in interfaceSequenceIterator
- Returns:
- the next Sequence
- Throws:
NoSuchElementException
- if you call nextSequence when hasNext returns falseBioException
- if for any reason the sequence could not be retrieved
-