de.jstacs.data.bioJava
Class SimpleSequenceIterator

java.lang.Object
  extended by de.jstacs.data.bioJava.SimpleSequenceIterator
All Implemented Interfaces:
SequenceIterator

public class SimpleSequenceIterator
extends Object
implements SequenceIterator

Class that implements the SequenceIterator interface of BioJava in a simple way, backed by an array of Sequences.

Author:
Jan Grau

Constructor Summary
SimpleSequenceIterator(Sequence... seqs)
          Creates a new SimpleSequenceIterator from an array of Sequences.
 
Method Summary
 boolean hasNext()
           
 Sequence nextSequence()
           
 void reset()
          Provides the possibility to reset and afterwards re-use this iterator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleSequenceIterator

public SimpleSequenceIterator(Sequence... seqs)
Creates a new SimpleSequenceIterator from an array of Sequences.

Parameters:
seqs - the array of Sequences
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface SequenceIterator

nextSequence

public Sequence nextSequence()
                      throws NoSuchElementException,
                             BioException
Specified by:
nextSequence in interface SequenceIterator
Throws:
NoSuchElementException
BioException

reset

public void reset()
Provides the possibility to reset and afterwards re-use this iterator.