Class DoubleArrayCodec

java.lang.Object
com.hypixel.hytale.codec.codecs.array.DoubleArrayCodec
All Implemented Interfaces:
Codec<double[]>, RawJsonCodec<double[]>, SchemaConvertable<double[]>

public class DoubleArrayCodec extends Object implements Codec<double[]>, RawJsonCodec<double[]>
Since:
27/11/2018
Version:
1.0
  • Field Details

    • EMPTY_DOUBLE_ARRAY

      public static final double[] EMPTY_DOUBLE_ARRAY
  • Constructor Details

    • DoubleArrayCodec

      public DoubleArrayCodec()
  • Method Details

    • decode

      public double[] decode(@Nonnull org.bson.BsonValue bsonValue, ExtraInfo extraInfo)
      Specified by:
      decode in interface Codec<double[]>
    • encode

      @Nonnull public org.bson.BsonValue encode(@Nonnull double[] doubles, ExtraInfo extraInfo)
      Specified by:
      encode in interface Codec<double[]>
    • decodeJson

      public double[] decodeJson(@Nonnull RawJsonReader reader, ExtraInfo extraInfo) throws IOException
      Specified by:
      decodeJson in interface Codec<double[]>
      Specified by:
      decodeJson in interface RawJsonCodec<double[]>
      Throws:
      IOException
    • toSchema

      @Nonnull public Schema toSchema(@Nonnull SchemaContext context)
      Description copied from interface: SchemaConvertable
      Returns a schema object that represents this codec as JSON Schema.
      Specified by:
      toSchema in interface SchemaConvertable<double[]>
      Parameters:
      context - A context to use to assist with creating the schema.
      Returns:
      the generated schema.