Package htsjdk.tribble.readers

# Class LineIteratorImpl

java.lang.Object
htsjdk.samtools.util.AbstractIterator<String>
htsjdk.tribble.readers.LineIteratorImpl

All Implemented Interfaces:
  `LineIterator`, `Closeable`, `AutoCloseable`, `Iterator<String>`

public class LineIteratorImpl extends AbstractIterator<String> implements LineIterator, Closeable
A simple iterator over the elements in LineReader.

## Field Summary

### Fields inherited from class htsjdk.samtools.util.AbstractIterator

`next`

## Constructor Summary

Constructors
Constructor
Description
`LineIteratorImpl(LineReader lineReader)`

## Method Summary

Modifier and Type
Method
Description
`protected String`
`advance()`
`void`
`close()`
`String`
`toString()`

### Methods inherited from class htsjdk.samtools.util.AbstractIterator

`hasNext, isIterating, next, peek, remove`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface java.util.Iterator

`forEachRemaining, hasNext, next, remove`

### Methods inherited from interface htsjdk.tribble.readers.LineIterator

`peek`

## Constructor Details

### LineIteratorImpl

public LineIteratorImpl(LineReader lineReader)

Parameters:
  `lineReader` - The line reader whose elements are to be iterated over.

## Method Details

### advance

protected String advance()

Specified by:
  `advance` in class `AbstractIterator<String>`
Returns:
  the next element or null if the iterator is at the end

### close

public void close() throws IOException

Specified by:
  `close` in interface `AutoCloseable`
Specified by:
  `close` in interface `Closeable`
Throws:
  `IOException`

### toString

public String toString()

Overrides:
  `toString` in class `Object`