Package com.globalmentor.model
Interface Sequenceable<E>
-
- Type Parameters:
E
- The type of element in the sequence.
public interface Sequenceable<E>
An object that can appear in a sequence, able to provide the next object in the sequence.This interface differs from
Iterator
in the semantics of the "get next" functionality. AnIterator
is an independent object that returns different next objects after successive calls. ASequenceable
is an object that is part of a sequence, which will always return the successive object after this (which will seldom change).- Author:
- Garret Wilson
- See Also:
Iterator
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description E
getNext()
boolean
hasNext()
-
-
-
Method Detail
-
hasNext
boolean hasNext()
- Returns:
true
if there is an object after this one in the sequence.
-
getNext
E getNext()
- Returns:
- The next object in the sequence, which need not be constant.
-
-