Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.biojava.bio.seq
Interface SequenceIterator

All Known Subinterfaces:
  RichSequenceIterator

All Known Implementing Classes:
  HashedFastaIterator, RichSequence.IOTools.SingleRichSeqIterator, RichStreamReader, StreamReader

    public interface SequenceIterator

An iterator over a bag of sequences.

java.util.Iterator was not appropriate here, as we need specific exceptions to be thrown, and as much type-safety as possible. However, we have made it as compliant with Iterator as we could so that there is a minimal learning curve.

Author:
  Matthew Pocock
See Also:
  `RichSequenceIterator`

Method Summary
`boolean` | `hasNext()` Returns whether there are more sequences to iterate over.
`Sequence` | `nextSequence()` Returns the next sequence in the iterator.

Method Detail

### hasNext

    boolean hasNext()

  Returns whether there are more sequences to iterate over.

  Returns:
    true if there are more sequences to get and false otherwise

### nextSequence

    Sequence nextSequence()
                          throws NoSuchElementException,
                                 BioException

  Returns the next sequence in the iterator.

  Returns:
    the next Sequence
  Throws:
    `NoSuchElementException` - if you call nextSequence when hasNext returns false
    `BioException` - if for any reason the sequence could not be retrieved

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD