Package org.snpeff.fileIterator

# Class BinSeqFileIterator<T extends BinarySequence>

java.lang.Object
org.snpeff.fileIterator.BinSeqFileIterator<T>

Type Parameters:
  `T` -

All Implemented Interfaces:
  `Iterable<T>`, `Iterator<T>`

Direct Known Subclasses:
  `DnaSeqFileIterator`, `DnaSeqIdFileIterator`, `DnaSeqPeFileIterator`

public class BinSeqFileIterator<T extends BinarySequence> extends Object implements Iterable<T>, Iterator<T>
Reads all sequences from a file Warning: You should always call "close()" at the end of the iteration.

Author:
  pcingola

## Constructor Summary

Constructors
Constructor
Description
`BinSeqFileIterator(String fileName)`

## Method Summary

Modifier and Type
Method
Description
`void`
`close()`
Close file (if not already done)
`boolean`
`hasNext()`
`Iterator<T>`
`iterator()`
`T`
`next()`
`void`
`remove()`

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

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

### Methods inherited from interface java.lang.Iterable

`forEach, spliterator`

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

`forEachRemaining`

## Constructor Details

### BinSeqFileIterator

public BinSeqFileIterator(String fileName)

## Method Details

### close

public void close()
Close file (if not already done)

### hasNext

public boolean hasNext()

Specified by:
  `hasNext` in interface `Iterator<T extends BinarySequence>`

### iterator

public Iterator<T> iterator()

Specified by:
  `iterator` in interface `Iterable<T extends BinarySequence>`

### next

public T next()

Specified by:
  `next` in interface `Iterator<T extends BinarySequence>`

### remove

public void remove()

Specified by:
  `remove` in interface `Iterator<T extends BinarySequence>`