public static class BCF2FieldEncoder.StringOrCharacter extends BCF2FieldEncoder
BCF2FieldEncoder.AtomicInt, BCF2FieldEncoder.Flag, BCF2FieldEncoder.Float, BCF2FieldEncoder.GenericInts, BCF2FieldEncoder.IntArray, BCF2FieldEncoder.StringOrCharacter| Constructor and Description |
|---|
StringOrCharacter(VCFCompoundHeaderLine headerLine,
java.util.Map<java.lang.String,java.lang.Integer> dict) |
| Modifier and Type | Method and Description |
|---|---|
void |
encodeValue(BCF2Encoder encoder,
java.lang.Object value,
BCF2Type type,
int minValues)
Key abstract method that should encode a value of the given type into the encoder.
|
boolean |
hasConstantNumElements()
True if this field has a constant, fixed number of elements (such as 1 for an atomic integer)
|
boolean |
hasContextDeterminedNumElements()
True if this field has a non-fixed number of elements that depends only on the properties
of the current VariantContext, such as one value per Allele or per genotype configuration.
|
boolean |
hasValueDeterminedNumElements()
True if the only way to determine how many elements this field contains is by
inspecting the actual value directly, such as when the number of elements
is a variable length list per site or per genotype.
|
protected int |
numElementsFromValue(java.lang.Object value)
Given a value, return the number of elements we will encode for it.
|
getCountType, getDynamicType, getField, getStaticType, getType, isDynamicallyTyped, isStaticallyTyped, numElements, numElements, numElements, numElements, toString, writeFieldKeypublic StringOrCharacter(VCFCompoundHeaderLine headerLine, java.util.Map<java.lang.String,java.lang.Integer> dict)
public void encodeValue(BCF2Encoder encoder, java.lang.Object value, BCF2Type type, int minValues) throws java.io.IOException
BCF2FieldEncoderencodeValue in class BCF2FieldEncoderjava.io.IOExceptionpublic boolean hasConstantNumElements()
BCF2FieldEncoderhasConstantNumElements in class BCF2FieldEncoderpublic boolean hasContextDeterminedNumElements()
BCF2FieldEncoderhasContextDeterminedNumElements in class BCF2FieldEncoderpublic boolean hasValueDeterminedNumElements()
BCF2FieldEncoderhasValueDeterminedNumElements in class BCF2FieldEncoderprotected int numElementsFromValue(java.lang.Object value)
BCF2FieldEncodernumElementsFromValue in class BCF2FieldEncoder