public abstract class BCF2FieldEncoder
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
BCF2FieldEncoder.AtomicInt
Specialized int encoder for atomic (non-list) integers
|
static class |
BCF2FieldEncoder.Flag |
static class |
BCF2FieldEncoder.Float |
static class |
BCF2FieldEncoder.GenericInts |
static class |
BCF2FieldEncoder.IntArray |
static class |
BCF2FieldEncoder.StringOrCharacter |
Modifier and Type | Method and Description |
---|---|
abstract 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.
|
protected VCFHeaderLineCount |
getCountType() |
BCF2Type |
getDynamicType(java.lang.Object value) |
java.lang.String |
getField() |
BCF2Type |
getStaticType() |
BCF2Type |
getType(java.lang.Object value)
Get the BCF2 type for this field, either from the static type of the
field itself or by inspecting the value itself.
|
boolean |
hasConstantNumElements() |
boolean |
hasContextDeterminedNumElements() |
boolean |
hasValueDeterminedNumElements() |
boolean |
isDynamicallyTyped()
Is the BCF2 type of this field static, or does it have to be determine from
the actual field value itself?
|
boolean |
isStaticallyTyped()
Is the BCF2 type of this field static, or does it have to be determine from
the actual field value itself?
|
int |
numElements() |
int |
numElements(java.lang.Object value) |
int |
numElements(VariantContext vc) |
int |
numElements(VariantContext vc,
java.lang.Object value)
A convenience access for the number of elements.
|
protected int |
numElementsFromValue(java.lang.Object value)
Given a value, return the number of elements we will encode for it.
|
java.lang.String |
toString() |
void |
writeFieldKey(BCF2Encoder encoder)
Write the field key (dictionary offset and type) into the BCF2Encoder stream
|
public final java.lang.String getField()
public final void writeFieldKey(BCF2Encoder encoder) throws java.io.IOException
encoder
- where we write our dictionary offsetjava.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
protected final VCFHeaderLineCount getCountType()
public boolean hasConstantNumElements()
public boolean hasValueDeterminedNumElements()
public boolean hasContextDeterminedNumElements()
public int numElements()
public int numElements(java.lang.Object value)
public int numElements(VariantContext vc)
public final int numElements(VariantContext vc, java.lang.Object value)
vc
- value
- protected int numElementsFromValue(java.lang.Object value)
value
- public final boolean isStaticallyTyped()
public final boolean isDynamicallyTyped()
public final BCF2Type getType(java.lang.Object value)
public final BCF2Type getStaticType()
public BCF2Type getDynamicType(java.lang.Object value)
public abstract void encodeValue(BCF2Encoder encoder, java.lang.Object value, BCF2Type type, int minValues) throws java.io.IOException
encoder
- value
- type
- minValues
- java.io.IOException