# Class IntervalListReferenceSequenceMask

java.lang.Object
htsjdk.samtools.util.IntervalListReferenceSequenceMask

All Implemented Interfaces:
  `ReferenceSequenceMask`

public class IntervalListReferenceSequenceMask extends Object implements ReferenceSequenceMask
Serve up loci of interest based on an interval list.

## Constructor Summary

Constructors
Constructor
Description
`IntervalListReferenceSequenceMask(IntervalList intervalList)`

## Method Summary

Modifier and Type
Method
Description
`boolean`
`get(int sequenceIndex, int position)`
It is required that sequenceIndex is >= any previous sequenceIndex passed to this class.
`SAMFileHeader`
`getHeader()`
`int`
`getMaxPosition()`
`int`
`getMaxSequenceIndex()`
`int`
`nextPosition(int sequenceIndex, int position)`
It is required that sequenceIndex is >= any previous sequenceIndex passed to this class.

### Methods inherited from class Object

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

## Constructor Details

### IntervalListReferenceSequenceMask

public IntervalListReferenceSequenceMask(IntervalList intervalList)

## Method Details

### get

public boolean get(int sequenceIndex, int position)
It is required that sequenceIndex is >= any previous sequenceIndex passed to this class.

Specified by:
  `get` in interface `ReferenceSequenceMask`
Returns:
  true if the mask is set for the given sequence and position

### nextPosition

public int nextPosition(int sequenceIndex, int position)
It is required that sequenceIndex is >= any previous sequenceIndex passed to this class.

Specified by:
  `nextPosition` in interface `ReferenceSequenceMask`
Returns:
  the next pos on the given sequence >= position that is set, or -1 if there are no more set positions

### getMaxSequenceIndex

public int getMaxSequenceIndex()

Specified by:
  `getMaxSequenceIndex` in interface `ReferenceSequenceMask`
Returns:
  Largest sequence index for which there are set bits.

### getMaxPosition

public int getMaxPosition()

Specified by:
  `getMaxPosition` in interface `ReferenceSequenceMask`
Returns:
  the largest position on the last sequence index

### getHeader

public SAMFileHeader getHeader()