# Class PairedVariantSubContextIterator

java.lang.Object
picard.vcf.PairedVariantSubContextIterator

All Implemented Interfaces:
  `Iterator<PairedVariantSubContextIterator.VcfTuple>`

public class PairedVariantSubContextIterator extends Object implements Iterator<PairedVariantSubContextIterator.VcfTuple>
An iterator that takes a pair of iterators over VariantContexts and iterates over them in tandem. A tuple will be returned with variant contexts for both contexts if present. Otherwise, the missing context at that site will be empty. The contexts will be returned in coordinate order.

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static class`
`PairedVariantSubContextIterator.VcfTuple`
Little class to hold a pair of VariantContexts that are in sync with one another.

## Constructor Summary

Constructors
Constructor
Description
`PairedVariantSubContextIterator(Iterator<htsjdk.variant.variantcontext.VariantContext> leftIterator, String leftSample, Iterator<htsjdk.variant.variantcontext.VariantContext> rightIterator, String rightSample, htsjdk.samtools.SAMSequenceDictionary dict)`

## Method Summary

Modifier and Type
Method
Description
`boolean`
`hasNext()`
`PairedVariantSubContextIterator.VcfTuple`
`next()`
`void`
`remove()`

### Methods inherited from class Object

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

### Methods inherited from interface Iterator

`forEachRemaining`

## Constructor Details

### PairedVariantSubContextIterator

public PairedVariantSubContextIterator(Iterator<htsjdk.variant.variantcontext.VariantContext> leftIterator, String leftSample, Iterator<htsjdk.variant.variantcontext.VariantContext> rightIterator, String rightSample, htsjdk.samtools.SAMSequenceDictionary dict)

## Method Details

### hasNext

public boolean hasNext()

Specified by:
  `hasNext` in interface `Iterator<PairedVariantSubContextIterator.VcfTuple>`

### next

public PairedVariantSubContextIterator.VcfTuple next()

Specified by:
  `next` in interface `Iterator<PairedVariantSubContextIterator.VcfTuple>`

### remove

public void remove()

Specified by:
  `remove` in interface `Iterator<PairedVariantSubContextIterator.VcfTuple>`