Class EncodingFactory


  • public class EncodingFactory
    extends Object
    A helper class to instantiate an appropriate Encoding for a given DataSeriesType and Encoding. Also useful to hide encoding implementations.
    • Constructor Detail

      • EncodingFactory

        public EncodingFactory()
    • 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 encoding
        id - encoding id used for data serialization
        Returns:
        a new encoding with the requested parameters