Package net.kyori.adventure.util
Interface Codec<D,E,DX extends Throwable,EX extends Throwable>
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceCodec.Decoder<D,E,X extends Throwable>A decoder.static interfaceCodec.Encoder<D,E,X extends Throwable>An encoder.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description static <D,E,DX extends Throwable,EX extends Throwable>
@NotNull Codec<D,E,DX,EX>codec(@NotNull Codec.Decoder<D,E,DX> decoder, @NotNull Codec.Encoder<D,E,EX> encoder)Creates a codec.Ddecode(E encoded)Decodes.Eencode(D decoded)Encodes.static <D,E,DX extends Throwable,EX extends Throwable>
@NotNull Codec<D,E,DX,EX>of(@NotNull Codec.Decoder<D,E,DX> decoder, @NotNull Codec.Encoder<D,E,EX> encoder)Deprecated.for removal since 4.10.0, usecodec(Codec.Decoder, Codec.Encoder)instead.
-
-
-
Method Detail
-
codec
@NotNull static <D,E,DX extends Throwable,EX extends Throwable> @NotNull Codec<D,E,DX,EX> codec(@NotNull @NotNull Codec.Decoder<D,E,DX> decoder, @NotNull @NotNull Codec.Encoder<D,E,EX> encoder)
Creates a codec.- Type Parameters:
D- the decoded typeE- the encoded typeDX- the decode exception typeEX- the encode exception type- Parameters:
decoder- the decoderencoder- the encoder- Returns:
- a codec
- Since:
- 4.10.0
-
of
@Deprecated @ScheduledForRemoval(inVersion="5.0.0") @NotNull static <D,E,DX extends Throwable,EX extends Throwable> @NotNull Codec<D,E,DX,EX> of(@NotNull @NotNull Codec.Decoder<D,E,DX> decoder, @NotNull @NotNull Codec.Encoder<D,E,EX> encoder)
Deprecated.for removal since 4.10.0, usecodec(Codec.Decoder, Codec.Encoder)instead.Creates a codec.- Type Parameters:
D- the decoded typeE- the encoded typeDX- the decode exception typeEX- the encode exception type- Parameters:
decoder- the decoderencoder- the encoder- Returns:
- a codec
- Since:
- 4.0.0
-
-