Package htsjdk.samtools.util
Class AbstractIterator<E>
java.lang.Object
htsjdk.samtools.util.AbstractIterator<E>
- All Implemented Interfaces:
Iterator<E>
- Direct Known Subclasses:
LineIteratorImpl
Base class of implementing iterators. All you have to do is implement advance which gets
the next element.
-
Field Details
-
next
-
-
Constructor Details
-
AbstractIterator
public AbstractIterator()
-
-
Method Details
-
hasNext
public boolean hasNext() -
next
-
remove
public void remove() -
advance
- Returns:
- the next element or null if the iterator is at the end
-
peek
Returns the next element in the iterator, if one exists. Otherwise, returns null. Invoking this method does not advance the iterator.- Returns:
- The next element in the iterator, without advancing, or, if no other element exists, null.
-
isIterating
protected boolean isIterating()- Returns:
- true after the first time hasNext() or next() have been called
-