Class FloatArrayCodec

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

public class FloatArrayCodec extends Object implements Codec<float[]>, RawJsonCodec<float[]>
  • Field Details

    • EMPTY_FLOAT_ARRAY

      public static final float[] EMPTY_FLOAT_ARRAY
  • Constructor Details

    • FloatArrayCodec

      public FloatArrayCodec()
  • Method Details

    • decode

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

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

      public float[] decodeJson(@Nonnull RawJsonReader reader, ExtraInfo extraInfo) throws IOException
      Specified by:
      decodeJson in interface Codec<float[]>
      Specified by:
      decodeJson in interface RawJsonCodec<float[]>
      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<float[]>
      Parameters:
      context - A context to use to assist with creating the schema.
      Returns:
      the generated schema.