|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.unibi.techfak.jpredictor.sequences.SequenceEnumerator
public class SequenceEnumerator
Class which implements the SequenceEnumeration-interface.
If this class was constructed giving a SequenceReader,
the Sequences are extracted from it. If it was constructed
giving a single Sequence, then only that sequence is
supplied by calling nextSequence() for the first time, and
every other call to nextSequence() will throw an exception.
SequenceReader,
SequenceEnumeration,
Sequence| Field Summary | |
|---|---|
private int |
actSequenceInFile
Holds the counter of the sequence. |
private SequenceReader |
seqReader
The underlying Reader from which the sequences are to send out. |
private Sequence |
sequ
If this variable is not null, it is returned and
the seqReader variable is not used. |
| Constructor Summary | |
|---|---|
SequenceEnumerator(Sequence sequ)
Constructor. |
|
SequenceEnumerator(SequenceReader seqReader)
Constructor. |
|
| Method Summary | |
|---|---|
Sequence |
nextSequence()
Gos through the underlying stream for the next Sequence
to return. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private int actSequenceInFile
private SequenceReader seqReader
private Sequence sequ
null, it is returned and
the seqReader variable is not used.
| Constructor Detail |
|---|
public SequenceEnumerator(SequenceReader seqReader)
SequenceReader object which
writes SequenceInformationBlocks to distinguish
single sequences from each other.
seqReader - The Reader from which the single
sequences are to be obtained.
java.lang.NullPointerException - If seqReader is
nullSequenceReaderpublic SequenceEnumerator(Sequence sequ)
Sequence which is the
only object returned when calls to nextSequence()
are performed.
sequ - The Sequence from which the single
sequences are to be obtained.
java.lang.NullPointerException - If sequ is
nullSequence| Method Detail |
|---|
public Sequence nextSequence()
throws NoMoreSequencesAvailableException
SequenceEnumerationSequence
to return. If no one could be found, a
NoMoreSequencesAvailableException is thrown.
nextSequence in interface SequenceEnumerationSequence.
NoMoreSequencesAvailableException - If no more sequence was
found in the Reader.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||