public class SynchronizedSequenceIterator<T extends SequenceElement> extends java.lang.Object implements SequenceIterator<T>
Modifier and Type | Field and Description |
---|---|
protected SequenceIterator<T> |
underlyingIterator |
Constructor and Description |
---|
SynchronizedSequenceIterator(SequenceIterator<T> iterator)
Creates SynchronizedSequenceIterator on top of any SequenceIterator
|
Modifier and Type | Method and Description |
---|---|
boolean |
hasMoreSequences()
Checks, if there's any more sequences left in data source
|
Sequence<T> |
nextSequence()
Returns next sequence from data source
|
void |
reset()
This method resets underlying iterator
|
protected SequenceIterator<T extends SequenceElement> underlyingIterator
public SynchronizedSequenceIterator(@NonNull SequenceIterator<T> iterator)
iterator
- public boolean hasMoreSequences()
hasMoreSequences
in interface SequenceIterator<T extends SequenceElement>
public Sequence<T> nextSequence()
nextSequence
in interface SequenceIterator<T extends SequenceElement>
public void reset()
reset
in interface SequenceIterator<T extends SequenceElement>