# Class SamHeader

java.lang.Object
org.snpeff.sam.SamHeader

All Implemented Interfaces:
  `Iterable<String>`

public class SamHeader extends Object implements Iterable<String>
Sam header

Author:
  pcingola

## Constructor Summary

Constructors
Constructor
Description
`SamHeader()`

## Method Summary

Modifier and Type
Method
Description
`void`
`add(SamHeaderRecord samHeaderRecord)`
Add a record to the header
`void`
`addHeaderRecord(String line)`
`ArrayList<SamHeaderRecord>`
`getRecords(String recordType)`
Get a list of records for this 'recordType'
`Iterator<String>`
`iterator()`

### Methods inherited from class Object

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

### Methods inherited from interface Iterable

`forEach, spliterator`

## Constructor Details

### SamHeader

public SamHeader()

## Method Details

### add

public void add(SamHeaderRecord samHeaderRecord)
Add a record to the header

### addHeaderRecord

public void addHeaderRecord(String line)

### getRecords

public ArrayList<SamHeaderRecord> getRecords(String recordType)
Get a list of records for this 'recordType'

Parameters:
  `recordType` -
Returns:
  A new empty list is created if no records are available

### iterator

public Iterator<String> iterator()

Specified by:
  `iterator` in interface `Iterable<String>`