de.unibi.techfak.jpredictor.sequences
Interface SequenceEnumeration

All Known Implementing Classes:
SequenceEnumerator

public interface SequenceEnumeration

Classes which implement this interface intend to read streams (like a file) full of single sequences that are to be parted.

The stream concept restricts the usage to reading the stream only forward and sequentially. Thus this interface is not like a normal Enumaration interface and no method like hasMoreSequences() is provided. Instead a NoMoreSequencesAvailableException is thrown when requesting a sequence that is not available due to end-of-file.

See Also:
NoMoreSequencesAvailableException

Method Summary
 Sequence nextSequence()
          Gos through the underlying stream for the next Sequence to return.
 

Method Detail

nextSequence

Sequence nextSequence()
                      throws NoMoreSequencesAvailableException
Gos through the underlying stream for the next Sequence to return. If no one could be found, a NoMoreSequencesAvailableException is thrown.

Returns:
A Sequence.
Throws:
NoMoreSequencesAvailableException - If no more sequence was found in the Reader.