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 Modifier and Type Method Description 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)Creates a codec.
-
-
-
Method Detail
-
of
@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)
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
-
-