Class Object2DoubleMapCodec<T>

java.lang.Object
com.hypixel.hytale.codec.codecs.map.Object2DoubleMapCodec<T>
All Implemented Interfaces:
Codec<it.unimi.dsi.fastutil.objects.Object2DoubleMap<T>>, RawJsonCodec<it.unimi.dsi.fastutil.objects.Object2DoubleMap<T>>, SchemaConvertable<it.unimi.dsi.fastutil.objects.Object2DoubleMap<T>>, WrappedCodec<T>

public class Object2DoubleMapCodec<T> extends Object implements Codec<it.unimi.dsi.fastutil.objects.Object2DoubleMap<T>>, WrappedCodec<T>
Since:
07/03/2018
Version:
1.0
  • Constructor Details

    • Object2DoubleMapCodec

      public Object2DoubleMapCodec(Codec<T> keyCodec, Supplier<it.unimi.dsi.fastutil.objects.Object2DoubleMap<T>> supplier, boolean unmodifiable)
    • Object2DoubleMapCodec

      public Object2DoubleMapCodec(Codec<T> keyCodec, Supplier<it.unimi.dsi.fastutil.objects.Object2DoubleMap<T>> supplier)
  • Method Details

    • getChildCodec

      public Codec<T> getChildCodec()
      Specified by:
      getChildCodec in interface WrappedCodec<T>
    • decode

      public it.unimi.dsi.fastutil.objects.Object2DoubleMap<T> decode(@Nonnull org.bson.BsonValue bsonValue, ExtraInfo extraInfo)
      Specified by:
      decode in interface Codec<T>
    • encode

      @Nonnull public org.bson.BsonValue encode(@Nonnull it.unimi.dsi.fastutil.objects.Object2DoubleMap<T> map, ExtraInfo extraInfo)
      Specified by:
      encode in interface Codec<T>
    • decodeJson

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