Package picard.vcf.processor.util

# Class PredicateFilterDecoratingClosableIterator<T>

java.lang.Object
picard.vcf.processor.util.PredicateFilterDecoratingClosableIterator<T>

All Implemented Interfaces:
  `htsjdk.samtools.util.CloseableIterator<T>`, `Closeable`, `AutoCloseable`, `Iterator<T>`

public class PredicateFilterDecoratingClosableIterator<T> extends Object implements htsjdk.samtools.util.CloseableIterator<T>
Performs on-the-fly filtering of the provided `VariantContext` `Iterator` such that only variants that satisfy all predicates are emitted. This class only exists because `Iterators.filter(Iterator, Predicate)` won't produce a `CloseableIterator`, which is necessary.

## Constructor Summary

Constructors
Constructor
Description
`PredicateFilterDecoratingClosableIterator(htsjdk.samtools.util.CloseableIterator<T> underlyingIterator, Collection<com.google.common.base.Predicate<T>> predicates)`

## Method Summary

Modifier and Type
Method
Description
`void`
`close()`
`boolean`
`hasNext()`
`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 htsjdk.samtools.util.CloseableIterator

`stream, toList`

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

`forEachRemaining`

## Constructor Details

### PredicateFilterDecoratingClosableIterator

public PredicateFilterDecoratingClosableIterator(htsjdk.samtools.util.CloseableIterator<T> underlyingIterator, Collection<com.google.common.base.Predicate<T>> predicates)

## Method Details

### hasNext

public boolean hasNext()

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

### next

public T next()

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

### close

public void close()

Specified by:
  `close` in interface `AutoCloseable`
Specified by:
  `close` in interface `Closeable`
Specified by:
  `close` in interface `htsjdk.samtools.util.CloseableIterator<T>`

### remove

public void remove()

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