Package htsjdk.samtools

# Class BinList

java.lang.Object
htsjdk.samtools.BinList

All Implemented Interfaces:
  `Iterable<Bin>`

public class BinList extends Object implements Iterable<Bin>
Provides a list of all bins which could exist in the BAM file. Allows the user to iterate over all bins, selecting ones of interest for later inspection.

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`BinList(int referenceSequence, BitSet bins)`
Create a new BinList over sequenceCount sequences, consisting of the given bins.

## Method Summary

Modifier and Type
Method
Description
`protected BitSet`
`getBins()`
Retrieves the bins stored in this list.
`protected int`
`getReferenceSequence()`
Get the reference sequence to which this bin belongs.
`Iterator<Bin>`
`iterator()`
Gets an iterator over all selected bins.

### 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`

## Constructor Details

### BinList

protected BinList(int referenceSequence, BitSet bins)
Create a new BinList over sequenceCount sequences, consisting of the given bins.

Parameters:
  `referenceSequence` - Reference sequence to which these bins are relevant.
  `bins` - The given bins to include.

## Method Details

### iterator

public Iterator<Bin> iterator()
Gets an iterator over all selected bins.

Specified by:
  `iterator` in interface `Iterable<Bin>`
Returns:
  An iterator over all selected bins.

### getReferenceSequence

protected int getReferenceSequence()
Get the reference sequence to which this bin belongs.

Returns:
  Integer representing the reference sequence.

### getBins

protected BitSet getBins()
Retrieves the bins stored in this list.

Returns:
  A bitset where a bin is present in the list if the bit is true.