Package picard.vcf

# Class ByIntervalListVariantContextIterator

java.lang.Object
picard.vcf.ByIntervalListVariantContextIterator

All Implemented Interfaces:
  `Iterator<htsjdk.variant.variantcontext.VariantContext>`

public class ByIntervalListVariantContextIterator extends Object implements Iterator<htsjdk.variant.variantcontext.VariantContext>
Takes a VCFFileReader and an IntervalList and provides a single iterator over all variants in all the intervals. //TODO Currently this uses the VCFFileReader.query method - could be useful to make a version of this iterator that uses the .iterator method

## Constructor Summary

Constructors
Constructor
Description
`ByIntervalListVariantContextIterator(htsjdk.variant.vcf.VCFFileReader reader, htsjdk.samtools.util.IntervalList intervals)`

## Method Summary

Modifier and Type
Method
Description
`boolean`
`hasNext()`
`htsjdk.variant.variantcontext.VariantContext`
`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.util.Iterator

`forEachRemaining`

## Constructor Details

### ByIntervalListVariantContextIterator

public ByIntervalListVariantContextIterator(htsjdk.variant.vcf.VCFFileReader reader, htsjdk.samtools.util.IntervalList intervals)

Parameters:
  `reader` - the source of variants.
  `intervals` - the intervals to which to restrict variants.

## Method Details

### hasNext

public boolean hasNext()

Specified by:
  `hasNext` in interface `Iterator<htsjdk.variant.variantcontext.VariantContext>`

### next

public htsjdk.variant.variantcontext.VariantContext next()

Specified by:
  `next` in interface `Iterator<htsjdk.variant.variantcontext.VariantContext>`

### remove

public void remove()

Specified by:
  `remove` in interface `Iterator<htsjdk.variant.variantcontext.VariantContext>`