# Class Field

java.lang.Object
org.snpsift.lang.expression.Expression
org.snpsift.lang.expression.Field

Direct Known Subclasses:
  `FieldConstant, FieldSub`

public class Field extends Expression
A field: E.g.: 'DP', 'CHROM'

Author:
  pablocingolani

## Field Summary

Fields
Modifier and Type
Field
Description
`protected boolean`
`exceptionIfNotFound`
`protected String`
`name`
`protected int`
`number`
`protected org.snpeff.vcf.VcfInfoType`
`returnType`
`static final int`
`TYPE_ALL`
`static final int`
`TYPE_ANY`
`protected org.snpeff.vcf.VcfHeaderInfo`
`vcfInfo`
`protected org.snpeff.vcf.VcfHeaderInfo.VcfInfoNumber`
`vcfInfoNumber`

### Fields inherited from class Expression

`debug, negated, operator`

## Constructor Summary

Constructors
Constructor
Description
`Field(String name)`

## Method Summary

Modifier and Type
Method
Description
`Value`
`eval(org.snpeff.vcf.VcfEntry vcfEntry)`
Evaluate expression using VcfEntry
`Value`
`eval(org.snpeff.vcf.VcfGenotype vcfGenotype)`
Evaluate expression using genotype
`protected Object`
`fieldHeaderNotFound(org.snpeff.vcf.VcfEntry vcfEntry)`
`protected Object`
`fieldNotFound(org.snpeff.vcf.VcfEntry vcfEntry)`
`String`
`getFieldString(org.snpeff.vcf.VcfGenotype vcfGenotype)`
`String`
`getName()`
`org.snpeff.vcf.VcfInfoType`
`getReturnType(org.snpeff.vcf.VcfGenotype vcfGenotype)`
`protected int`
`getSampleNum(org.snpeff.vcf.VcfEntry vcfEntry, String name)`
`protected Object`
`gtFieldNotFound(org.snpeff.vcf.VcfGenotype vcfGenotype)`
`String`
`indexStr(int index)`
Convert and index to a string
`protected boolean`
`isSampleName(org.snpeff.vcf.VcfEntry vcfEntry, String name)`
`protected boolean`
`isSub()`
`org.snpeff.vcf.VcfInfoType`
`returnType(org.snpeff.vcf.VcfEntry vcfEntry)`
`org.snpeff.vcf.VcfInfoType`
`returnType(org.snpeff.vcf.VcfGenotype vcfGenotype)`
`void`
`setExceptionIfNotFound(boolean exceptionIfNotFound)`
`String`
`toString()`

### Methods inherited from class Expression

`setNegated`

### Methods inherited from class Object

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

## Field Details

### TYPE_ALL

public static final int TYPE_ALL

See Also:
  - Constant Field Values

### TYPE_ANY

public static final int TYPE_ANY

See Also:
  - Constant Field Values

### name

protected String name

### returnType

protected org.snpeff.vcf.VcfInfoType returnType

### exceptionIfNotFound

protected boolean exceptionIfNotFound

### vcfInfo

protected org.snpeff.vcf.VcfHeaderInfo vcfInfo

### number

protected int number

### vcfInfoNumber

protected org.snpeff.vcf.VcfHeaderInfo.VcfInfoNumber vcfInfoNumber

## Constructor Details

### Field

public Field(String name)

## Method Details

### eval

public Value eval(org.snpeff.vcf.VcfEntry vcfEntry)
Description copied from class: `Expression`
Evaluate expression using VcfEntry

Specified by:
  `eval` in class `Expression`

### eval

public Value eval(org.snpeff.vcf.VcfGenotype vcfGenotype)
Description copied from class: `Expression`
Evaluate expression using genotype

Specified by:
  `eval` in class `Expression`

### fieldHeaderNotFound

protected Object fieldHeaderNotFound(org.snpeff.vcf.VcfEntry vcfEntry)

### fieldNotFound

protected Object fieldNotFound(org.snpeff.vcf.VcfEntry vcfEntry)

### getFieldString

public String getFieldString(org.snpeff.vcf.VcfGenotype vcfGenotype)

### getName

public String getName()

### getReturnType

public org.snpeff.vcf.VcfInfoType getReturnType(org.snpeff.vcf.VcfGenotype vcfGenotype)

### getSampleNum

protected int getSampleNum(org.snpeff.vcf.VcfEntry vcfEntry, String name)

### gtFieldNotFound

protected Object gtFieldNotFound(org.snpeff.vcf.VcfGenotype vcfGenotype)

### indexStr

public String indexStr(int index)
Convert and index to a string

### isSampleName

protected boolean isSampleName(org.snpeff.vcf.VcfEntry vcfEntry, String name)

### isSub

protected boolean isSub()

### returnType

public org.snpeff.vcf.VcfInfoType returnType(org.snpeff.vcf.VcfEntry vcfEntry)

### returnType

public org.snpeff.vcf.VcfInfoType returnType(org.snpeff.vcf.VcfGenotype vcfGenotype)

### setExceptionIfNotFound

public void setExceptionIfNotFound(boolean exceptionIfNotFound)

### toString

public String toString()

Overrides:
  `toString` in class `Object`