Package htsjdk.samtools.cram.encoding
Class EncodingFactory
- java.lang.Object
-
- htsjdk.samtools.cram.encoding.EncodingFactory
-
public class EncodingFactory extends Object
A helper class to instantiate an appropriateEncoding
for a givenDataSeriesType
andEncoding
. Also useful to hide encoding implementations.
-
-
Constructor Summary
Constructors Constructor Description EncodingFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Encoding<T>
createEncoding(DataSeriesType valueType, EncodingID id)
Create an encoding for the data series type and encoding id.
-
-
-
Method Detail
-
createEncoding
public <T> Encoding<T> createEncoding(DataSeriesType valueType, EncodingID id)
Create an encoding for the data series type and encoding id.- Type Parameters:
T
- encoding object type, like Integer or String.- Parameters:
valueType
- data type of the values to be produced/consumed by the encodingid
- encoding id used for data serialization- Returns:
- a new encoding with the requested parameters
-
-