Class BsonFunctionCodec<T>

java.lang.Object
com.hypixel.hytale.codec.function.BsonFunctionCodec<T>
All Implemented Interfaces:
Codec<T>, RawJsonCodec<T>, SchemaConvertable<T>, WrappedCodec<T>
Direct Known Subclasses:
DocumentContainingCodec

@Deprecated public class BsonFunctionCodec<T> extends Object implements Codec<T>, WrappedCodec<T>
Deprecated.
Since:
18/8/17.
Version:
1.0
  • Constructor Details

    • BsonFunctionCodec

      public BsonFunctionCodec(Codec<T> codec, BiFunction<T, org.bson.BsonValue, T> decode, BiFunction<org.bson.BsonValue, T, org.bson.BsonValue> encode)
      Deprecated.
  • Method Details

    • decode

      public T decode(org.bson.BsonValue bsonValue, ExtraInfo extraInfo)
      Deprecated.
      Specified by:
      decode in interface Codec<T>
    • encode

      public org.bson.BsonValue encode(T r, ExtraInfo extraInfo)
      Deprecated.
      Specified by:
      encode in interface Codec<T>
    • toSchema

      @Nonnull public Schema toSchema(@Nonnull SchemaContext context)
      Deprecated.
      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.
    • getChildCodec

      @Nonnull public Codec<T> getChildCodec()
      Deprecated.
      Specified by:
      getChildCodec in interface WrappedCodec<T>