# Class VCFHeaderLine

java.lang.Object
htsjdk.variant.vcf.VCFHeaderLine

All Implemented Interfaces:
  `Serializable, Comparable`

Direct Known Subclasses:
  `VCFCompoundHeaderLine, VCFSimpleHeaderLine`

public class VCFHeaderLine extends Object implements Comparable, Serializable

See Also:
  - Serialized Form

## Field Summary

Fields
Modifier and Type
Field
Description
`protected static final boolean`
`ALLOW_UNBOUND_DESCRIPTIONS`
`static final long`
`serialVersionUID`
`protected static final String`
`UNBOUND_DESCRIPTION`

## Constructor Summary

Constructors
Constructor
Description
`VCFHeaderLine(String key, String value)`
create a VCF header line

## Method Summary

Modifier and Type
Method
Description
`int`
`compareTo(Object other)`
`boolean`
`equals(Object o)`
`String`
`getKey()`
Get the key
`String`
`getValue()`
Get the value
`int`
`hashCode()`
`static boolean`
`isHeaderLine(String line)`
`boolean`
`shouldBeAddedToDictionary()`
By default the header lines won't be added to the dictionary, unless this method will be override (for example in FORMAT, INFO or FILTER header lines)
`String`
`toString()`
`protected String`
`toStringEncoding()`
Should be overloaded in sub classes to do subclass specific
`static String`
`toStringEncoding(Map<String, ? extends Object> keyValues)`
create a string of a mapping pair for the target VCF version

### Methods inherited from class Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

## Field Details

### serialVersionUID

public static final long serialVersionUID

See Also:
  - Constant Field Values

### ALLOW_UNBOUND_DESCRIPTIONS

protected static final boolean ALLOW_UNBOUND_DESCRIPTIONS

See Also:
  - Constant Field Values

### UNBOUND_DESCRIPTION

protected static final String UNBOUND_DESCRIPTION

See Also:
  - Constant Field Values

## Constructor Details

### VCFHeaderLine

public VCFHeaderLine(String key, String value)
create a VCF header line

Parameters:
  `key` - the key for this header line
  `value` - the value for this header line

## Method Details

### getKey

public String getKey()
Get the key

Returns:
  the key

### getValue

public String getValue()
Get the value

Returns:
  the value

### shouldBeAddedToDictionary

public boolean shouldBeAddedToDictionary()
By default the header lines won't be added to the dictionary, unless this method will be override (for example in FORMAT, INFO or FILTER header lines)

Returns:
  false

### toString

public String toString()

Overrides:
  `toString` in class `Object`

### toStringEncoding

protected String toStringEncoding()
Should be overloaded in sub classes to do subclass specific

Returns:
  the string encoding

### equals

public boolean equals(Object o)

Overrides:
  `equals` in class `Object`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`

### compareTo

public int compareTo(Object other)

Specified by:
  `compareTo` in interface `Comparable`

### isHeaderLine

public static boolean isHeaderLine(String line)

Parameters:
  `line` - the line
Returns:
  true if the line is a VCF meta data line, or false if it is not

### toStringEncoding

public static String toStringEncoding(Map<String, ? extends Object> keyValues)
create a string of a mapping pair for the target VCF version

Parameters:
  `keyValues` - a mapping of the key->value pairs to output
Returns:
  a string, correctly formatted