- Type Parameters:
R
- the return type, never null.
A struct codec is a map backed
You can also use
Codec
, where the keys are strings.
See Codec
, Decoder
and Encoder
You can also use
struct(String, Codec, Function, F1)
to create as templating
similar to NetworkBufferTemplate
You can use structs to create complex objects
record MyObject(double coolnessFactor, @Nullable String of) {
static final StructCodec<MyObject> CODEC = StructCodec.struct(
"id", Codec.DOUBLE, MyObject::coolnessFactor,
"name", Codec.STRING.optional(), MyObject::of,
MyObject::new
);
public MyObject {
coolnessFactor = Math.clamp(coolnessFactor, 0.0, 2.0); // Too powerful
}
}
MyObject value = new MyObject(7.8d, "me"); // Or use a null name for no name.
// Encoding to JSON
JsonElement encoded = MyObject.CODEC.encode(Transcoder.JSON, value).orElseThrow();
// Decoding from JSON
MyObject decoded = MyObject.CODEC.decode(Transcoder.JSON, encoded).orElseThrow();
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minestom.server.codec.Codec
Codec.RawValue
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
A special key used to instruct the codec to inline the value instead of wrapping it in a map.Fields inherited from interface net.minestom.server.codec.Codec
BLOCK_POSITION, BOOLEAN, BYTE, BYTE_ARRAY, COMPONENT, COMPONENT_STYLE, DOUBLE, FLOAT, INT, INT_ARRAY, KEY, LONG, LONG_ARRAY, NBT, NBT_COMPOUND, RAW_VALUE, SHORT, STRING, UNIT, UUID, UUID_COERCED, UUID_STRING, VECTOR3D
-
Method Summary
Modifier and TypeMethodDescriptiondecode
(Transcoder<D> coder, D value) Decodes a value ofDecoder
using the specificTranscoder
TheResult
will be ofResult.Ok
orResult.Error
and its typedDecoder
decodeFromMap
(Transcoder<D> coder, Transcoder.MapLike<D> map) Decode a valueStructCodec
from the backing map ofStructCodec
default <D> Result
<D> encode
(Transcoder<D> coder, R value) Encodes a value ofEncoder
using the specificTranscoder
TheResult
will be ofResult.Ok
orResult.Error
and its typedEncoder
<D> Result
<D> encodeToMap
(Transcoder<D> coder, R value, Transcoder.MapBuilder<D> map) Decode a valueStructCodec
into the backing map ofStructCodec
default StructCodec
<R> orElseStruct
(StructCodec<R> other) Similar toCodec.orElse(Codec)
but uses the map backing instead.static <R,
P1 extends @UnknownNullability Object, P2 extends @UnknownNullability Object, P3 extends @UnknownNullability Object, P4 extends @UnknownNullability Object, P5 extends @UnknownNullability Object, P6 extends @UnknownNullability Object, P7 extends @UnknownNullability Object, P8 extends @UnknownNullability Object, P9 extends @UnknownNullability Object, P10 extends @UnknownNullability Object, P11 extends @UnknownNullability Object, P12 extends @UnknownNullability Object, P13 extends @UnknownNullability Object, P14 extends @UnknownNullability Object, P15 extends @UnknownNullability Object, P16 extends @UnknownNullability Object, P17 extends @UnknownNullability Object, P18 extends @UnknownNullability Object, P19 extends @UnknownNullability Object, P20 extends @UnknownNullability Object>
StructCodec<R> struct
(String name1, Codec<P1> codec1, Function<R, P1> getter1, String name2, Codec<P2> codec2, Function<R, P2> getter2, String name3, Codec<P3> codec3, Function<R, P3> getter3, String name4, Codec<P4> codec4, Function<R, P4> getter4, String name5, Codec<P5> codec5, Function<R, P5> getter5, String name6, Codec<P6> codec6, Function<R, P6> getter6, String name7, Codec<P7> codec7, Function<R, P7> getter7, String name8, Codec<P8> codec8, Function<R, P8> getter8, String name9, Codec<P9> codec9, Function<R, P9> getter9, String name10, Codec<P10> codec10, Function<R, P10> getter10, String name11, Codec<P11> codec11, Function<R, P11> getter11, String name12, Codec<P12> codec12, Function<R, P12> getter12, String name13, Codec<P13> codec13, Function<R, P13> getter13, String name14, Codec<P14> codec14, Function<R, P14> getter14, String name15, Codec<P15> codec15, Function<R, P15> getter15, String name16, Codec<P16> codec16, Function<R, P16> getter16, String name17, Codec<P17> codec17, Function<R, P17> getter17, String name18, Codec<P18> codec18, Function<R, P18> getter18, String name19, Codec<P19> codec19, Function<R, P19> getter19, String name20, Codec<P20> codec20, Function<R, P20> getter20, NetworkBufferTemplate.F20<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, R> ctor) Creates a struct template.static <R,
P1 extends @UnknownNullability Object, P2 extends @UnknownNullability Object, P3 extends @UnknownNullability Object, P4 extends @UnknownNullability Object, P5 extends @UnknownNullability Object, P6 extends @UnknownNullability Object, P7 extends @UnknownNullability Object, P8 extends @UnknownNullability Object, P9 extends @UnknownNullability Object, P10 extends @UnknownNullability Object, P11 extends @UnknownNullability Object, P12 extends @UnknownNullability Object, P13 extends @UnknownNullability Object, P14 extends @UnknownNullability Object, P15 extends @UnknownNullability Object, P16 extends @UnknownNullability Object, P17 extends @UnknownNullability Object, P18 extends @UnknownNullability Object, P19 extends @UnknownNullability Object>
StructCodec<R> struct
(String name1, Codec<P1> codec1, Function<R, P1> getter1, String name2, Codec<P2> codec2, Function<R, P2> getter2, String name3, Codec<P3> codec3, Function<R, P3> getter3, String name4, Codec<P4> codec4, Function<R, P4> getter4, String name5, Codec<P5> codec5, Function<R, P5> getter5, String name6, Codec<P6> codec6, Function<R, P6> getter6, String name7, Codec<P7> codec7, Function<R, P7> getter7, String name8, Codec<P8> codec8, Function<R, P8> getter8, String name9, Codec<P9> codec9, Function<R, P9> getter9, String name10, Codec<P10> codec10, Function<R, P10> getter10, String name11, Codec<P11> codec11, Function<R, P11> getter11, String name12, Codec<P12> codec12, Function<R, P12> getter12, String name13, Codec<P13> codec13, Function<R, P13> getter13, String name14, Codec<P14> codec14, Function<R, P14> getter14, String name15, Codec<P15> codec15, Function<R, P15> getter15, String name16, Codec<P16> codec16, Function<R, P16> getter16, String name17, Codec<P17> codec17, Function<R, P17> getter17, String name18, Codec<P18> codec18, Function<R, P18> getter18, String name19, Codec<P19> codec19, Function<R, P19> getter19, NetworkBufferTemplate.F19<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, R> ctor) Creates a struct template.static <R,
P1 extends @UnknownNullability Object, P2 extends @UnknownNullability Object, P3 extends @UnknownNullability Object, P4 extends @UnknownNullability Object, P5 extends @UnknownNullability Object, P6 extends @UnknownNullability Object, P7 extends @UnknownNullability Object, P8 extends @UnknownNullability Object, P9 extends @UnknownNullability Object, P10 extends @UnknownNullability Object, P11 extends @UnknownNullability Object, P12 extends @UnknownNullability Object, P13 extends @UnknownNullability Object, P14 extends @UnknownNullability Object, P15 extends @UnknownNullability Object, P16 extends @UnknownNullability Object, P17 extends @UnknownNullability Object, P18 extends @UnknownNullability Object>
StructCodec<R> struct
(String name1, Codec<P1> codec1, Function<R, P1> getter1, String name2, Codec<P2> codec2, Function<R, P2> getter2, String name3, Codec<P3> codec3, Function<R, P3> getter3, String name4, Codec<P4> codec4, Function<R, P4> getter4, String name5, Codec<P5> codec5, Function<R, P5> getter5, String name6, Codec<P6> codec6, Function<R, P6> getter6, String name7, Codec<P7> codec7, Function<R, P7> getter7, String name8, Codec<P8> codec8, Function<R, P8> getter8, String name9, Codec<P9> codec9, Function<R, P9> getter9, String name10, Codec<P10> codec10, Function<R, P10> getter10, String name11, Codec<P11> codec11, Function<R, P11> getter11, String name12, Codec<P12> codec12, Function<R, P12> getter12, String name13, Codec<P13> codec13, Function<R, P13> getter13, String name14, Codec<P14> codec14, Function<R, P14> getter14, String name15, Codec<P15> codec15, Function<R, P15> getter15, String name16, Codec<P16> codec16, Function<R, P16> getter16, String name17, Codec<P17> codec17, Function<R, P17> getter17, String name18, Codec<P18> codec18, Function<R, P18> getter18, NetworkBufferTemplate.F18<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, R> ctor) Creates a struct template.static <R,
P1 extends @UnknownNullability Object, P2 extends @UnknownNullability Object, P3 extends @UnknownNullability Object, P4 extends @UnknownNullability Object, P5 extends @UnknownNullability Object, P6 extends @UnknownNullability Object, P7 extends @UnknownNullability Object, P8 extends @UnknownNullability Object, P9 extends @UnknownNullability Object, P10 extends @UnknownNullability Object, P11 extends @UnknownNullability Object, P12 extends @UnknownNullability Object, P13 extends @UnknownNullability Object, P14 extends @UnknownNullability Object, P15 extends @UnknownNullability Object, P16 extends @UnknownNullability Object, P17 extends @UnknownNullability Object>
StructCodec<R> struct
(String name1, Codec<P1> codec1, Function<R, P1> getter1, String name2, Codec<P2> codec2, Function<R, P2> getter2, String name3, Codec<P3> codec3, Function<R, P3> getter3, String name4, Codec<P4> codec4, Function<R, P4> getter4, String name5, Codec<P5> codec5, Function<R, P5> getter5, String name6, Codec<P6> codec6, Function<R, P6> getter6, String name7, Codec<P7> codec7, Function<R, P7> getter7, String name8, Codec<P8> codec8, Function<R, P8> getter8, String name9, Codec<P9> codec9, Function<R, P9> getter9, String name10, Codec<P10> codec10, Function<R, P10> getter10, String name11, Codec<P11> codec11, Function<R, P11> getter11, String name12, Codec<P12> codec12, Function<R, P12> getter12, String name13, Codec<P13> codec13, Function<R, P13> getter13, String name14, Codec<P14> codec14, Function<R, P14> getter14, String name15, Codec<P15> codec15, Function<R, P15> getter15, String name16, Codec<P16> codec16, Function<R, P16> getter16, String name17, Codec<P17> codec17, Function<R, P17> getter17, NetworkBufferTemplate.F17<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, R> ctor) Creates a struct template.static <R,
P1 extends @UnknownNullability Object, P2 extends @UnknownNullability Object, P3 extends @UnknownNullability Object, P4 extends @UnknownNullability Object, P5 extends @UnknownNullability Object, P6 extends @UnknownNullability Object, P7 extends @UnknownNullability Object, P8 extends @UnknownNullability Object, P9 extends @UnknownNullability Object, P10 extends @UnknownNullability Object, P11 extends @UnknownNullability Object, P12 extends @UnknownNullability Object, P13 extends @UnknownNullability Object, P14 extends @UnknownNullability Object, P15 extends @UnknownNullability Object, P16 extends @UnknownNullability Object>
StructCodec<R> struct
(String name1, Codec<P1> codec1, Function<R, P1> getter1, String name2, Codec<P2> codec2, Function<R, P2> getter2, String name3, Codec<P3> codec3, Function<R, P3> getter3, String name4, Codec<P4> codec4, Function<R, P4> getter4, String name5, Codec<P5> codec5, Function<R, P5> getter5, String name6, Codec<P6> codec6, Function<R, P6> getter6, String name7, Codec<P7> codec7, Function<R, P7> getter7, String name8, Codec<P8> codec8, Function<R, P8> getter8, String name9, Codec<P9> codec9, Function<R, P9> getter9, String name10, Codec<P10> codec10, Function<R, P10> getter10, String name11, Codec<P11> codec11, Function<R, P11> getter11, String name12, Codec<P12> codec12, Function<R, P12> getter12, String name13, Codec<P13> codec13, Function<R, P13> getter13, String name14, Codec<P14> codec14, Function<R, P14> getter14, String name15, Codec<P15> codec15, Function<R, P15> getter15, String name16, Codec<P16> codec16, Function<R, P16> getter16, NetworkBufferTemplate.F16<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, R> ctor) Creates a struct template.static <R,
P1 extends @UnknownNullability Object, P2 extends @UnknownNullability Object, P3 extends @UnknownNullability Object, P4 extends @UnknownNullability Object, P5 extends @UnknownNullability Object, P6 extends @UnknownNullability Object, P7 extends @UnknownNullability Object, P8 extends @UnknownNullability Object, P9 extends @UnknownNullability Object, P10 extends @UnknownNullability Object, P11 extends @UnknownNullability Object, P12 extends @UnknownNullability Object, P13 extends @UnknownNullability Object, P14 extends @UnknownNullability Object, P15 extends @UnknownNullability Object>
StructCodec<R> struct
(String name1, Codec<P1> codec1, Function<R, P1> getter1, String name2, Codec<P2> codec2, Function<R, P2> getter2, String name3, Codec<P3> codec3, Function<R, P3> getter3, String name4, Codec<P4> codec4, Function<R, P4> getter4, String name5, Codec<P5> codec5, Function<R, P5> getter5, String name6, Codec<P6> codec6, Function<R, P6> getter6, String name7, Codec<P7> codec7, Function<R, P7> getter7, String name8, Codec<P8> codec8, Function<R, P8> getter8, String name9, Codec<P9> codec9, Function<R, P9> getter9, String name10, Codec<P10> codec10, Function<R, P10> getter10, String name11, Codec<P11> codec11, Function<R, P11> getter11, String name12, Codec<P12> codec12, Function<R, P12> getter12, String name13, Codec<P13> codec13, Function<R, P13> getter13, String name14, Codec<P14> codec14, Function<R, P14> getter14, String name15, Codec<P15> codec15, Function<R, P15> getter15, NetworkBufferTemplate.F15<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, R> ctor) Creates a struct template.static <R,
P1 extends @UnknownNullability Object, P2 extends @UnknownNullability Object, P3 extends @UnknownNullability Object, P4 extends @UnknownNullability Object, P5 extends @UnknownNullability Object, P6 extends @UnknownNullability Object, P7 extends @UnknownNullability Object, P8 extends @UnknownNullability Object, P9 extends @UnknownNullability Object, P10 extends @UnknownNullability Object, P11 extends @UnknownNullability Object, P12 extends @UnknownNullability Object, P13 extends @UnknownNullability Object, P14 extends @UnknownNullability Object>
StructCodec<R> struct
(String name1, Codec<P1> codec1, Function<R, P1> getter1, String name2, Codec<P2> codec2, Function<R, P2> getter2, String name3, Codec<P3> codec3, Function<R, P3> getter3, String name4, Codec<P4> codec4, Function<R, P4> getter4, String name5, Codec<P5> codec5, Function<R, P5> getter5, String name6, Codec<P6> codec6, Function<R, P6> getter6, String name7, Codec<P7> codec7, Function<R, P7> getter7, String name8, Codec<P8> codec8, Function<R, P8> getter8, String name9, Codec<P9> codec9, Function<R, P9> getter9, String name10, Codec<P10> codec10, Function<R, P10> getter10, String name11, Codec<P11> codec11, Function<R, P11> getter11, String name12, Codec<P12> codec12, Function<R, P12> getter12, String name13, Codec<P13> codec13, Function<R, P13> getter13, String name14, Codec<P14> codec14, Function<R, P14> getter14, NetworkBufferTemplate.F14<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, R> ctor) Creates a struct template.static <R,
P1 extends @UnknownNullability Object, P2 extends @UnknownNullability Object, P3 extends @UnknownNullability Object, P4 extends @UnknownNullability Object, P5 extends @UnknownNullability Object, P6 extends @UnknownNullability Object, P7 extends @UnknownNullability Object, P8 extends @UnknownNullability Object, P9 extends @UnknownNullability Object, P10 extends @UnknownNullability Object, P11 extends @UnknownNullability Object, P12 extends @UnknownNullability Object, P13 extends @UnknownNullability Object>
StructCodec<R> struct
(String name1, Codec<P1> codec1, Function<R, P1> getter1, String name2, Codec<P2> codec2, Function<R, P2> getter2, String name3, Codec<P3> codec3, Function<R, P3> getter3, String name4, Codec<P4> codec4, Function<R, P4> getter4, String name5, Codec<P5> codec5, Function<R, P5> getter5, String name6, Codec<P6> codec6, Function<R, P6> getter6, String name7, Codec<P7> codec7, Function<R, P7> getter7, String name8, Codec<P8> codec8, Function<R, P8> getter8, String name9, Codec<P9> codec9, Function<R, P9> getter9, String name10, Codec<P10> codec10, Function<R, P10> getter10, String name11, Codec<P11> codec11, Function<R, P11> getter11, String name12, Codec<P12> codec12, Function<R, P12> getter12, String name13, Codec<P13> codec13, Function<R, P13> getter13, NetworkBufferTemplate.F13<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, R> ctor) Creates a struct template.static <R,
P1 extends @UnknownNullability Object, P2 extends @UnknownNullability Object, P3 extends @UnknownNullability Object, P4 extends @UnknownNullability Object, P5 extends @UnknownNullability Object, P6 extends @UnknownNullability Object, P7 extends @UnknownNullability Object, P8 extends @UnknownNullability Object, P9 extends @UnknownNullability Object, P10 extends @UnknownNullability Object, P11 extends @UnknownNullability Object, P12 extends @UnknownNullability Object>
StructCodec<R> struct
(String name1, Codec<P1> codec1, Function<R, P1> getter1, String name2, Codec<P2> codec2, Function<R, P2> getter2, String name3, Codec<P3> codec3, Function<R, P3> getter3, String name4, Codec<P4> codec4, Function<R, P4> getter4, String name5, Codec<P5> codec5, Function<R, P5> getter5, String name6, Codec<P6> codec6, Function<R, P6> getter6, String name7, Codec<P7> codec7, Function<R, P7> getter7, String name8, Codec<P8> codec8, Function<R, P8> getter8, String name9, Codec<P9> codec9, Function<R, P9> getter9, String name10, Codec<P10> codec10, Function<R, P10> getter10, String name11, Codec<P11> codec11, Function<R, P11> getter11, String name12, Codec<P12> codec12, Function<R, P12> getter12, NetworkBufferTemplate.F12<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, R> ctor) Creates a struct template.static <R,
P1 extends @UnknownNullability Object, P2 extends @UnknownNullability Object, P3 extends @UnknownNullability Object, P4 extends @UnknownNullability Object, P5 extends @UnknownNullability Object, P6 extends @UnknownNullability Object, P7 extends @UnknownNullability Object, P8 extends @UnknownNullability Object, P9 extends @UnknownNullability Object, P10 extends @UnknownNullability Object, P11 extends @UnknownNullability Object>
StructCodec<R> struct
(String name1, Codec<P1> codec1, Function<R, P1> getter1, String name2, Codec<P2> codec2, Function<R, P2> getter2, String name3, Codec<P3> codec3, Function<R, P3> getter3, String name4, Codec<P4> codec4, Function<R, P4> getter4, String name5, Codec<P5> codec5, Function<R, P5> getter5, String name6, Codec<P6> codec6, Function<R, P6> getter6, String name7, Codec<P7> codec7, Function<R, P7> getter7, String name8, Codec<P8> codec8, Function<R, P8> getter8, String name9, Codec<P9> codec9, Function<R, P9> getter9, String name10, Codec<P10> codec10, Function<R, P10> getter10, String name11, Codec<P11> codec11, Function<R, P11> getter11, NetworkBufferTemplate.F11<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, R> ctor) Creates a struct template.static <R,
P1 extends @UnknownNullability Object, P2 extends @UnknownNullability Object, P3 extends @UnknownNullability Object, P4 extends @UnknownNullability Object, P5 extends @UnknownNullability Object, P6 extends @UnknownNullability Object, P7 extends @UnknownNullability Object, P8 extends @UnknownNullability Object, P9 extends @UnknownNullability Object, P10 extends @UnknownNullability Object>
StructCodec<R> struct
(String name1, Codec<P1> codec1, Function<R, P1> getter1, String name2, Codec<P2> codec2, Function<R, P2> getter2, String name3, Codec<P3> codec3, Function<R, P3> getter3, String name4, Codec<P4> codec4, Function<R, P4> getter4, String name5, Codec<P5> codec5, Function<R, P5> getter5, String name6, Codec<P6> codec6, Function<R, P6> getter6, String name7, Codec<P7> codec7, Function<R, P7> getter7, String name8, Codec<P8> codec8, Function<R, P8> getter8, String name9, Codec<P9> codec9, Function<R, P9> getter9, String name10, Codec<P10> codec10, Function<R, P10> getter10, NetworkBufferTemplate.F10<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, R> ctor) Creates a struct template.static <R,
P1 extends @UnknownNullability Object, P2 extends @UnknownNullability Object, P3 extends @UnknownNullability Object, P4 extends @UnknownNullability Object, P5 extends @UnknownNullability Object, P6 extends @UnknownNullability Object, P7 extends @UnknownNullability Object, P8 extends @UnknownNullability Object, P9 extends @UnknownNullability Object>
StructCodec<R> struct
(String name1, Codec<P1> codec1, Function<R, P1> getter1, String name2, Codec<P2> codec2, Function<R, P2> getter2, String name3, Codec<P3> codec3, Function<R, P3> getter3, String name4, Codec<P4> codec4, Function<R, P4> getter4, String name5, Codec<P5> codec5, Function<R, P5> getter5, String name6, Codec<P6> codec6, Function<R, P6> getter6, String name7, Codec<P7> codec7, Function<R, P7> getter7, String name8, Codec<P8> codec8, Function<R, P8> getter8, String name9, Codec<P9> codec9, Function<R, P9> getter9, NetworkBufferTemplate.F9<P1, P2, P3, P4, P5, P6, P7, P8, P9, R> ctor) Creates a struct template.static <R,
P1 extends @UnknownNullability Object, P2 extends @UnknownNullability Object, P3 extends @UnknownNullability Object, P4 extends @UnknownNullability Object, P5 extends @UnknownNullability Object, P6 extends @UnknownNullability Object, P7 extends @UnknownNullability Object, P8 extends @UnknownNullability Object>
StructCodec<R> struct
(String name1, Codec<P1> codec1, Function<R, P1> getter1, String name2, Codec<P2> codec2, Function<R, P2> getter2, String name3, Codec<P3> codec3, Function<R, P3> getter3, String name4, Codec<P4> codec4, Function<R, P4> getter4, String name5, Codec<P5> codec5, Function<R, P5> getter5, String name6, Codec<P6> codec6, Function<R, P6> getter6, String name7, Codec<P7> codec7, Function<R, P7> getter7, String name8, Codec<P8> codec8, Function<R, P8> getter8, NetworkBufferTemplate.F8<P1, P2, P3, P4, P5, P6, P7, P8, R> ctor) Creates a struct template.static <R,
P1 extends @UnknownNullability Object, P2 extends @UnknownNullability Object, P3 extends @UnknownNullability Object, P4 extends @UnknownNullability Object, P5 extends @UnknownNullability Object, P6 extends @UnknownNullability Object, P7 extends @UnknownNullability Object>
StructCodec<R> struct
(String name1, Codec<P1> codec1, Function<R, P1> getter1, String name2, Codec<P2> codec2, Function<R, P2> getter2, String name3, Codec<P3> codec3, Function<R, P3> getter3, String name4, Codec<P4> codec4, Function<R, P4> getter4, String name5, Codec<P5> codec5, Function<R, P5> getter5, String name6, Codec<P6> codec6, Function<R, P6> getter6, String name7, Codec<P7> codec7, Function<R, P7> getter7, NetworkBufferTemplate.F7<P1, P2, P3, P4, P5, P6, P7, R> ctor) Creates a struct template.static <R,
P1 extends @UnknownNullability Object, P2 extends @UnknownNullability Object, P3 extends @UnknownNullability Object, P4 extends @UnknownNullability Object, P5 extends @UnknownNullability Object, P6 extends @UnknownNullability Object>
StructCodec<R> struct
(String name1, Codec<P1> codec1, Function<R, P1> getter1, String name2, Codec<P2> codec2, Function<R, P2> getter2, String name3, Codec<P3> codec3, Function<R, P3> getter3, String name4, Codec<P4> codec4, Function<R, P4> getter4, String name5, Codec<P5> codec5, Function<R, P5> getter5, String name6, Codec<P6> codec6, Function<R, P6> getter6, NetworkBufferTemplate.F6<P1, P2, P3, P4, P5, P6, R> ctor) Creates a struct template.static <R,
P1 extends @UnknownNullability Object, P2 extends @UnknownNullability Object, P3 extends @UnknownNullability Object, P4 extends @UnknownNullability Object, P5 extends @UnknownNullability Object>
StructCodec<R> struct
(String name1, Codec<P1> codec1, Function<R, P1> getter1, String name2, Codec<P2> codec2, Function<R, P2> getter2, String name3, Codec<P3> codec3, Function<R, P3> getter3, String name4, Codec<P4> codec4, Function<R, P4> getter4, String name5, Codec<P5> codec5, Function<R, P5> getter5, NetworkBufferTemplate.F5<P1, P2, P3, P4, P5, R> ctor) Creates a struct template.static <R,
P1 extends @UnknownNullability Object, P2 extends @UnknownNullability Object, P3 extends @UnknownNullability Object, P4 extends @UnknownNullability Object>
StructCodec<R> struct
(String name1, Codec<P1> codec1, Function<R, P1> getter1, String name2, Codec<P2> codec2, Function<R, P2> getter2, String name3, Codec<P3> codec3, Function<R, P3> getter3, String name4, Codec<P4> codec4, Function<R, P4> getter4, NetworkBufferTemplate.F4<P1, P2, P3, P4, R> ctor) Creates a struct template.static <R,
P1 extends @UnknownNullability Object, P2 extends @UnknownNullability Object, P3 extends @UnknownNullability Object>
StructCodec<R> struct
(String name1, Codec<P1> codec1, Function<R, P1> getter1, String name2, Codec<P2> codec2, Function<R, P2> getter2, String name3, Codec<P3> codec3, Function<R, P3> getter3, NetworkBufferTemplate.F3<P1, P2, P3, R> ctor) Creates a struct template.static <R,
P1 extends @UnknownNullability Object, P2 extends @UnknownNullability Object>
StructCodec<R> struct
(String name1, Codec<P1> codec1, Function<R, P1> getter1, String name2, Codec<P2> codec2, Function<R, P2> getter2, NetworkBufferTemplate.F2<P1, P2, R> ctor) Creates a struct template.static <R,
P1 extends @UnknownNullability Object>
StructCodec<R> struct
(String name1, Codec<P1> codec1, Function<R, P1> getter1, NetworkBufferTemplate.F1<P1, R> ctor) Creates a struct template.static <R> StructCodec
<R> Lazily returns the value in any struct.static <R> StructCodec
<R> struct
(R value) Returns the value in any struct.
-
Field Details
-
INLINE
A special key used to instruct the codec to inline the value instead of wrapping it in a map. The inlined codec must also be a StructCodec.- See Also:
-
-
Method Details
-
decodeFromMap
Decode a valueStructCodec
from the backing map ofStructCodec
- Type Parameters:
D
- the transcoder type- Parameters:
coder
- the transcoder forStructCodec
map
- the map to decode from- Returns:
- the result of decoding
-
encodeToMap
Decode a valueStructCodec
into the backing map ofStructCodec
- Type Parameters:
D
- the transcoder type- Parameters:
coder
- the transcoder forStructCodec
value
- the value ofStructCodec
to encodemap
- the map to decode from- Returns:
- the result of encoding
-
decode
Decodes a value ofDecoder
using the specificTranscoder
TheResult
will be ofResult.Ok
orResult.Error
and its typedDecoder
-
encode
Encodes a value ofEncoder
using the specificTranscoder
TheResult
will be ofResult.Ok
orResult.Error
and its typedEncoder
-
orElseStruct
Similar toCodec.orElse(Codec)
but uses the map backing instead.
For decoding it attempts to use the current codec or uses the other codec, if neither work returns the firsts error.- Parameters:
other
- the other struct codec- Returns:
- the new or else struct
-
struct
Returns the value in any struct.- Type Parameters:
R
- the return type- Parameters:
value
- the value to return ofStructCodec
- Returns:
- the new struct codec for value
-
struct
Lazily returns the value in any struct.- Type Parameters:
R
- the return type- Parameters:
ctor
- the value to return ofStructCodec
- Returns:
- the new struct codec for value
-
struct
static <R,P1 extends @UnknownNullability Object> StructCodec<R> struct(String name1, Codec<P1> codec1, Function<R, P1> getter1, NetworkBufferTemplate.F1<P1, R> ctor) Creates a struct template. SeeStructCodec
- Type Parameters:
R
- the return typeP1
- the first parameter type- Parameters:
name1
- the name/key forStructCodec
codec1
- the codec forStructCodec
getter1
- the getter forStructCodec
ctor
- the constructor forStructCodec
- Returns:
- the new
StructCodec
template.
-
struct
static <R,P1 extends @UnknownNullability Object, StructCodec<R> structP2 extends @UnknownNullability Object> (String name1, Codec<P1> codec1, Function<R, P1> getter1, String name2, Codec<P2> codec2, Function<R, P2> getter2, NetworkBufferTemplate.F2<P1, P2, R> ctor) Creates a struct template. SeeStructCodec
- Type Parameters:
R
- the return typeP1
- the first parameter typeP2
- the second parameter type- Parameters:
name1
- the name/key forStructCodec
codec1
- the codec forStructCodec
getter1
- the getter forStructCodec
name2
- the name/key forStructCodec
codec2
- the codec forStructCodec
getter2
- the getter forStructCodec
ctor
- the constructor forStructCodec
- Returns:
- the new
StructCodec
template.
-
struct
static <R,P1 extends @UnknownNullability Object, StructCodec<R> structP2 extends @UnknownNullability Object, P3 extends @UnknownNullability Object> (String name1, Codec<P1> codec1, Function<R, P1> getter1, String name2, Codec<P2> codec2, Function<R, P2> getter2, String name3, Codec<P3> codec3, Function<R, P3> getter3, NetworkBufferTemplate.F3<P1, P2, P3, R> ctor) Creates a struct template. SeeStructCodec
- Type Parameters:
R
- the return typeP1
- the first parameter typeP2
- the second parameter typeP3
- the third parameter type- Parameters:
name1
- the name/key forStructCodec
codec1
- the codec forStructCodec
getter1
- the getter forStructCodec
name2
- the name/key forStructCodec
codec2
- the codec forStructCodec
getter2
- the getter forStructCodec
name3
- the name/key forStructCodec
codec3
- the codec forStructCodec
getter3
- the getter forStructCodec
ctor
- the constructor forStructCodec
- Returns:
- the new
StructCodec
template.
-
struct
static <R,P1 extends @UnknownNullability Object, StructCodec<R> structP2 extends @UnknownNullability Object, P3 extends @UnknownNullability Object, P4 extends @UnknownNullability Object> (String name1, Codec<P1> codec1, Function<R, P1> getter1, String name2, Codec<P2> codec2, Function<R, P2> getter2, String name3, Codec<P3> codec3, Function<R, P3> getter3, String name4, Codec<P4> codec4, Function<R, P4> getter4, NetworkBufferTemplate.F4<P1, P2, P3, P4, R> ctor) Creates a struct template. SeeStructCodec
- Type Parameters:
R
- the return typeP1
- the first parameter typeP2
- the second parameter typeP3
- the third parameter typeP4
- the fourth parameter type- Parameters:
name1
- the name/key forStructCodec
codec1
- the codec forStructCodec
getter1
- the getter forStructCodec
name2
- the name/key forStructCodec
codec2
- the codec forStructCodec
getter2
- the getter forStructCodec
name3
- the name/key forStructCodec
codec3
- the codec forStructCodec
getter3
- the getter forStructCodec
name4
- the name/key forStructCodec
codec4
- the codec forStructCodec
getter4
- the getter forStructCodec
ctor
- the constructor forStructCodec
- Returns:
- the new
StructCodec
template.
-
struct
static <R,P1 extends @UnknownNullability Object, StructCodec<R> structP2 extends @UnknownNullability Object, P3 extends @UnknownNullability Object, P4 extends @UnknownNullability Object, P5 extends @UnknownNullability Object> (String name1, Codec<P1> codec1, Function<R, P1> getter1, String name2, Codec<P2> codec2, Function<R, P2> getter2, String name3, Codec<P3> codec3, Function<R, P3> getter3, String name4, Codec<P4> codec4, Function<R, P4> getter4, String name5, Codec<P5> codec5, Function<R, P5> getter5, NetworkBufferTemplate.F5<P1, P2, P3, P4, P5, R> ctor) Creates a struct template. SeeStructCodec
- Type Parameters:
R
- the return typeP1
- the first parameter typeP2
- the second parameter typeP3
- the third parameter typeP4
- the fourth parameter typeP5
- the fifth parameter type- Parameters:
name1
- the name/key forStructCodec
codec1
- the codec forStructCodec
getter1
- the getter forStructCodec
name2
- the name/key forStructCodec
codec2
- the codec forStructCodec
getter2
- the getter forStructCodec
name3
- the name/key forStructCodec
codec3
- the codec forStructCodec
getter3
- the getter forStructCodec
name4
- the name/key forStructCodec
codec4
- the codec forStructCodec
getter4
- the getter forStructCodec
name5
- the name/key forStructCodec
codec5
- the codec forStructCodec
getter5
- the getter forStructCodec
ctor
- the constructor forStructCodec
- Returns:
- the new
StructCodec
template.
-
struct
static <R,P1 extends @UnknownNullability Object, StructCodec<R> structP2 extends @UnknownNullability Object, P3 extends @UnknownNullability Object, P4 extends @UnknownNullability Object, P5 extends @UnknownNullability Object, P6 extends @UnknownNullability Object> (String name1, Codec<P1> codec1, Function<R, P1> getter1, String name2, Codec<P2> codec2, Function<R, P2> getter2, String name3, Codec<P3> codec3, Function<R, P3> getter3, String name4, Codec<P4> codec4, Function<R, P4> getter4, String name5, Codec<P5> codec5, Function<R, P5> getter5, String name6, Codec<P6> codec6, Function<R, P6> getter6, NetworkBufferTemplate.F6<P1, P2, P3, P4, P5, P6, R> ctor) Creates a struct template. SeeStructCodec
- Type Parameters:
R
- the return typeP1
- the first parameter typeP2
- the second parameter typeP3
- the third parameter typeP4
- the fourth parameter typeP5
- the fifth parameter typeP6
- the sixth parameter type- Parameters:
name1
- the name/key forStructCodec
codec1
- the codec forStructCodec
getter1
- the getter forStructCodec
name2
- the name/key forStructCodec
codec2
- the codec forStructCodec
getter2
- the getter forStructCodec
name3
- the name/key forStructCodec
codec3
- the codec forStructCodec
getter3
- the getter forStructCodec
name4
- the name/key forStructCodec
codec4
- the codec forStructCodec
getter4
- the getter forStructCodec
name5
- the name/key forStructCodec
codec5
- the codec forStructCodec
getter5
- the getter forStructCodec
name6
- the name/key forStructCodec
codec6
- the codec forStructCodec
getter6
- the getter forStructCodec
ctor
- the constructor forStructCodec
- Returns:
- the new
StructCodec
template.
-
struct
static <R,P1 extends @UnknownNullability Object, StructCodec<R> structP2 extends @UnknownNullability Object, P3 extends @UnknownNullability Object, P4 extends @UnknownNullability Object, P5 extends @UnknownNullability Object, P6 extends @UnknownNullability Object, P7 extends @UnknownNullability Object> (String name1, Codec<P1> codec1, Function<R, P1> getter1, String name2, Codec<P2> codec2, Function<R, P2> getter2, String name3, Codec<P3> codec3, Function<R, P3> getter3, String name4, Codec<P4> codec4, Function<R, P4> getter4, String name5, Codec<P5> codec5, Function<R, P5> getter5, String name6, Codec<P6> codec6, Function<R, P6> getter6, String name7, Codec<P7> codec7, Function<R, P7> getter7, NetworkBufferTemplate.F7<P1, P2, P3, P4, P5, P6, P7, R> ctor) Creates a struct template. SeeStructCodec
- Type Parameters:
R
- the return typeP1
- the first parameter typeP2
- the second parameter typeP3
- the third parameter typeP4
- the fourth parameter typeP5
- the fifth parameter typeP6
- the sixth parameter typeP7
- the seventh parameter type- Parameters:
name1
- the name/key forStructCodec
codec1
- the codec forStructCodec
getter1
- the getter forStructCodec
name2
- the name/key forStructCodec
codec2
- the codec forStructCodec
getter2
- the getter forStructCodec
name3
- the name/key forStructCodec
codec3
- the codec forStructCodec
getter3
- the getter forStructCodec
name4
- the name/key forStructCodec
codec4
- the codec forStructCodec
getter4
- the getter forStructCodec
name5
- the name/key forStructCodec
codec5
- the codec forStructCodec
getter5
- the getter forStructCodec
name6
- the name/key forStructCodec
codec6
- the codec forStructCodec
getter6
- the getter forStructCodec
name7
- the name/key forStructCodec
codec7
- the codec forStructCodec
getter7
- the getter forStructCodec
ctor
- the constructor forStructCodec
- Returns:
- the new
StructCodec
template.
-
struct
static <R,P1 extends @UnknownNullability Object, StructCodec<R> structP2 extends @UnknownNullability Object, P3 extends @UnknownNullability Object, P4 extends @UnknownNullability Object, P5 extends @UnknownNullability Object, P6 extends @UnknownNullability Object, P7 extends @UnknownNullability Object, P8 extends @UnknownNullability Object> (String name1, Codec<P1> codec1, Function<R, P1> getter1, String name2, Codec<P2> codec2, Function<R, P2> getter2, String name3, Codec<P3> codec3, Function<R, P3> getter3, String name4, Codec<P4> codec4, Function<R, P4> getter4, String name5, Codec<P5> codec5, Function<R, P5> getter5, String name6, Codec<P6> codec6, Function<R, P6> getter6, String name7, Codec<P7> codec7, Function<R, P7> getter7, String name8, Codec<P8> codec8, Function<R, P8> getter8, NetworkBufferTemplate.F8<P1, P2, P3, P4, P5, P6, P7, P8, R> ctor) Creates a struct template. SeeStructCodec
- Type Parameters:
R
- the return typeP1
- the first parameter typeP2
- the second parameter typeP3
- the third parameter typeP4
- the fourth parameter typeP5
- the fifth parameter typeP6
- the sixth parameter typeP7
- the seventh parameter typeP8
- the eighth parameter type- Parameters:
name1
- the name/key forStructCodec
codec1
- the codec forStructCodec
getter1
- the getter forStructCodec
name2
- the name/key forStructCodec
codec2
- the codec forStructCodec
getter2
- the getter forStructCodec
name3
- the name/key forStructCodec
codec3
- the codec forStructCodec
getter3
- the getter forStructCodec
name4
- the name/key forStructCodec
codec4
- the codec forStructCodec
getter4
- the getter forStructCodec
name5
- the name/key forStructCodec
codec5
- the codec forStructCodec
getter5
- the getter forStructCodec
name6
- the name/key forStructCodec
codec6
- the codec forStructCodec
getter6
- the getter forStructCodec
name7
- the name/key forStructCodec
codec7
- the codec forStructCodec
getter7
- the getter forStructCodec
name8
- the name/key forStructCodec
codec8
- the codec forStructCodec
getter8
- the getter forStructCodec
ctor
- the constructor forStructCodec
- Returns:
- the new
StructCodec
template.
-
struct
static <R,P1 extends @UnknownNullability Object, StructCodec<R> structP2 extends @UnknownNullability Object, P3 extends @UnknownNullability Object, P4 extends @UnknownNullability Object, P5 extends @UnknownNullability Object, P6 extends @UnknownNullability Object, P7 extends @UnknownNullability Object, P8 extends @UnknownNullability Object, P9 extends @UnknownNullability Object> (String name1, Codec<P1> codec1, Function<R, P1> getter1, String name2, Codec<P2> codec2, Function<R, P2> getter2, String name3, Codec<P3> codec3, Function<R, P3> getter3, String name4, Codec<P4> codec4, Function<R, P4> getter4, String name5, Codec<P5> codec5, Function<R, P5> getter5, String name6, Codec<P6> codec6, Function<R, P6> getter6, String name7, Codec<P7> codec7, Function<R, P7> getter7, String name8, Codec<P8> codec8, Function<R, P8> getter8, String name9, Codec<P9> codec9, Function<R, P9> getter9, NetworkBufferTemplate.F9<P1, P2, P3, P4, P5, P6, P7, P8, P9, R> ctor) Creates a struct template. SeeStructCodec
- Type Parameters:
R
- the return typeP1
- the first parameter typeP2
- the second parameter typeP3
- the third parameter typeP4
- the fourth parameter typeP5
- the fifth parameter typeP6
- the sixth parameter typeP7
- the seventh parameter typeP8
- the eighth parameter typeP9
- the ninth parameter type- Parameters:
name1
- the name/key forStructCodec
codec1
- the codec forStructCodec
getter1
- the getter forStructCodec
name2
- the name/key forStructCodec
codec2
- the codec forStructCodec
getter2
- the getter forStructCodec
name3
- the name/key forStructCodec
codec3
- the codec forStructCodec
getter3
- the getter forStructCodec
name4
- the name/key forStructCodec
codec4
- the codec forStructCodec
getter4
- the getter forStructCodec
name5
- the name/key forStructCodec
codec5
- the codec forStructCodec
getter5
- the getter forStructCodec
name6
- the name/key forStructCodec
codec6
- the codec forStructCodec
getter6
- the getter forStructCodec
name7
- the name/key forStructCodec
codec7
- the codec forStructCodec
getter7
- the getter forStructCodec
name8
- the name/key forStructCodec
codec8
- the codec forStructCodec
getter8
- the getter forStructCodec
name9
- the name/key forStructCodec
codec9
- the codec forStructCodec
getter9
- the getter forStructCodec
ctor
- the constructor forStructCodec
- Returns:
- the new
StructCodec
template.
-
struct
static <R,P1 extends @UnknownNullability Object, StructCodec<R> structP2 extends @UnknownNullability Object, P3 extends @UnknownNullability Object, P4 extends @UnknownNullability Object, P5 extends @UnknownNullability Object, P6 extends @UnknownNullability Object, P7 extends @UnknownNullability Object, P8 extends @UnknownNullability Object, P9 extends @UnknownNullability Object, P10 extends @UnknownNullability Object> (String name1, Codec<P1> codec1, Function<R, P1> getter1, String name2, Codec<P2> codec2, Function<R, P2> getter2, String name3, Codec<P3> codec3, Function<R, P3> getter3, String name4, Codec<P4> codec4, Function<R, P4> getter4, String name5, Codec<P5> codec5, Function<R, P5> getter5, String name6, Codec<P6> codec6, Function<R, P6> getter6, String name7, Codec<P7> codec7, Function<R, P7> getter7, String name8, Codec<P8> codec8, Function<R, P8> getter8, String name9, Codec<P9> codec9, Function<R, P9> getter9, String name10, Codec<P10> codec10, Function<R, P10> getter10, NetworkBufferTemplate.F10<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, R> ctor) Creates a struct template. SeeStructCodec
- Type Parameters:
R
- the return typeP1
- the first parameter typeP2
- the second parameter typeP3
- the third parameter typeP4
- the fourth parameter typeP5
- the fifth parameter typeP6
- the sixth parameter typeP7
- the seventh parameter typeP8
- the eighth parameter typeP9
- the ninth parameter typeP10
- the tenth parameter type- Parameters:
name1
- the name/key forStructCodec
codec1
- the codec forStructCodec
getter1
- the getter forStructCodec
name2
- the name/key forStructCodec
codec2
- the codec forStructCodec
getter2
- the getter forStructCodec
name3
- the name/key forStructCodec
codec3
- the codec forStructCodec
getter3
- the getter forStructCodec
name4
- the name/key forStructCodec
codec4
- the codec forStructCodec
getter4
- the getter forStructCodec
name5
- the name/key forStructCodec
codec5
- the codec forStructCodec
getter5
- the getter forStructCodec
name6
- the name/key forStructCodec
codec6
- the codec forStructCodec
getter6
- the getter forStructCodec
name7
- the name/key forStructCodec
codec7
- the codec forStructCodec
getter7
- the getter forStructCodec
name8
- the name/key forStructCodec
codec8
- the codec forStructCodec
getter8
- the getter forStructCodec
name9
- the name/key forStructCodec
codec9
- the codec forStructCodec
getter9
- the getter forStructCodec
name10
- the name/key forStructCodec
codec10
- the codec forStructCodec
getter10
- the getter forStructCodec
ctor
- the constructor forStructCodec
- Returns:
- the new
StructCodec
template.
-
struct
static <R,P1 extends @UnknownNullability Object, StructCodec<R> structP2 extends @UnknownNullability Object, P3 extends @UnknownNullability Object, P4 extends @UnknownNullability Object, P5 extends @UnknownNullability Object, P6 extends @UnknownNullability Object, P7 extends @UnknownNullability Object, P8 extends @UnknownNullability Object, P9 extends @UnknownNullability Object, P10 extends @UnknownNullability Object, P11 extends @UnknownNullability Object> (String name1, Codec<P1> codec1, Function<R, P1> getter1, String name2, Codec<P2> codec2, Function<R, P2> getter2, String name3, Codec<P3> codec3, Function<R, P3> getter3, String name4, Codec<P4> codec4, Function<R, P4> getter4, String name5, Codec<P5> codec5, Function<R, P5> getter5, String name6, Codec<P6> codec6, Function<R, P6> getter6, String name7, Codec<P7> codec7, Function<R, P7> getter7, String name8, Codec<P8> codec8, Function<R, P8> getter8, String name9, Codec<P9> codec9, Function<R, P9> getter9, String name10, Codec<P10> codec10, Function<R, P10> getter10, String name11, Codec<P11> codec11, Function<R, P11> getter11, NetworkBufferTemplate.F11<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, R> ctor) Creates a struct template. SeeStructCodec
- Type Parameters:
R
- the return typeP1
- the first parameter typeP2
- the second parameter typeP3
- the third parameter typeP4
- the fourth parameter typeP5
- the fifth parameter typeP6
- the sixth parameter typeP7
- the seventh parameter typeP8
- the eighth parameter typeP9
- the ninth parameter typeP10
- the tenth parameter typeP11
- the eleventh parameter type- Parameters:
name1
- the name/key forStructCodec
codec1
- the codec forStructCodec
getter1
- the getter forStructCodec
name2
- the name/key forStructCodec
codec2
- the codec forStructCodec
getter2
- the getter forStructCodec
name3
- the name/key forStructCodec
codec3
- the codec forStructCodec
getter3
- the getter forStructCodec
name4
- the name/key forStructCodec
codec4
- the codec forStructCodec
getter4
- the getter forStructCodec
name5
- the name/key forStructCodec
codec5
- the codec forStructCodec
getter5
- the getter forStructCodec
name6
- the name/key forStructCodec
codec6
- the codec forStructCodec
getter6
- the getter forStructCodec
name7
- the name/key forStructCodec
codec7
- the codec forStructCodec
getter7
- the getter forStructCodec
name8
- the name/key forStructCodec
codec8
- the codec forStructCodec
getter8
- the getter forStructCodec
name9
- the name/key forStructCodec
codec9
- the codec forStructCodec
getter9
- the getter forStructCodec
name10
- the name/key forStructCodec
codec10
- the codec forStructCodec
getter10
- the getter forStructCodec
name11
- the name/key forStructCodec
codec11
- the codec forStructCodec
getter11
- the getter forStructCodec
ctor
- the constructor forStructCodec
- Returns:
- the new
StructCodec
template.
-
struct
static <R,P1 extends @UnknownNullability Object, StructCodec<R> structP2 extends @UnknownNullability Object, P3 extends @UnknownNullability Object, P4 extends @UnknownNullability Object, P5 extends @UnknownNullability Object, P6 extends @UnknownNullability Object, P7 extends @UnknownNullability Object, P8 extends @UnknownNullability Object, P9 extends @UnknownNullability Object, P10 extends @UnknownNullability Object, P11 extends @UnknownNullability Object, P12 extends @UnknownNullability Object> (String name1, Codec<P1> codec1, Function<R, P1> getter1, String name2, Codec<P2> codec2, Function<R, P2> getter2, String name3, Codec<P3> codec3, Function<R, P3> getter3, String name4, Codec<P4> codec4, Function<R, P4> getter4, String name5, Codec<P5> codec5, Function<R, P5> getter5, String name6, Codec<P6> codec6, Function<R, P6> getter6, String name7, Codec<P7> codec7, Function<R, P7> getter7, String name8, Codec<P8> codec8, Function<R, P8> getter8, String name9, Codec<P9> codec9, Function<R, P9> getter9, String name10, Codec<P10> codec10, Function<R, P10> getter10, String name11, Codec<P11> codec11, Function<R, P11> getter11, String name12, Codec<P12> codec12, Function<R, P12> getter12, NetworkBufferTemplate.F12<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, R> ctor) Creates a struct template. SeeStructCodec
- Type Parameters:
R
- the return typeP1
- the first parameter typeP2
- the second parameter typeP3
- the third parameter typeP4
- the fourth parameter typeP5
- the fifth parameter typeP6
- the sixth parameter typeP7
- the seventh parameter typeP8
- the eighth parameter typeP9
- the ninth parameter typeP10
- the tenth parameter typeP11
- the eleventh parameter typeP12
- the twelfth parameter type- Parameters:
name1
- the name/key forStructCodec
codec1
- the codec forStructCodec
getter1
- the getter forStructCodec
name2
- the name/key forStructCodec
codec2
- the codec forStructCodec
getter2
- the getter forStructCodec
name3
- the name/key forStructCodec
codec3
- the codec forStructCodec
getter3
- the getter forStructCodec
name4
- the name/key forStructCodec
codec4
- the codec forStructCodec
getter4
- the getter forStructCodec
name5
- the name/key forStructCodec
codec5
- the codec forStructCodec
getter5
- the getter forStructCodec
name6
- the name/key forStructCodec
codec6
- the codec forStructCodec
getter6
- the getter forStructCodec
name7
- the name/key forStructCodec
codec7
- the codec forStructCodec
getter7
- the getter forStructCodec
name8
- the name/key forStructCodec
codec8
- the codec forStructCodec
getter8
- the getter forStructCodec
name9
- the name/key forStructCodec
codec9
- the codec forStructCodec
getter9
- the getter forStructCodec
name10
- the name/key forStructCodec
codec10
- the codec forStructCodec
getter10
- the getter forStructCodec
name11
- the name/key forStructCodec
codec11
- the codec forStructCodec
getter11
- the getter forStructCodec
name12
- the name/key forStructCodec
codec12
- the codec forStructCodec
getter12
- the getter forStructCodec
ctor
- the constructor forStructCodec
- Returns:
- the new
StructCodec
template.
-
struct
static <R,P1 extends @UnknownNullability Object, StructCodec<R> structP2 extends @UnknownNullability Object, P3 extends @UnknownNullability Object, P4 extends @UnknownNullability Object, P5 extends @UnknownNullability Object, P6 extends @UnknownNullability Object, P7 extends @UnknownNullability Object, P8 extends @UnknownNullability Object, P9 extends @UnknownNullability Object, P10 extends @UnknownNullability Object, P11 extends @UnknownNullability Object, P12 extends @UnknownNullability Object, P13 extends @UnknownNullability Object> (String name1, Codec<P1> codec1, Function<R, P1> getter1, String name2, Codec<P2> codec2, Function<R, P2> getter2, String name3, Codec<P3> codec3, Function<R, P3> getter3, String name4, Codec<P4> codec4, Function<R, P4> getter4, String name5, Codec<P5> codec5, Function<R, P5> getter5, String name6, Codec<P6> codec6, Function<R, P6> getter6, String name7, Codec<P7> codec7, Function<R, P7> getter7, String name8, Codec<P8> codec8, Function<R, P8> getter8, String name9, Codec<P9> codec9, Function<R, P9> getter9, String name10, Codec<P10> codec10, Function<R, P10> getter10, String name11, Codec<P11> codec11, Function<R, P11> getter11, String name12, Codec<P12> codec12, Function<R, P12> getter12, String name13, Codec<P13> codec13, Function<R, P13> getter13, NetworkBufferTemplate.F13<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, R> ctor) Creates a struct template. SeeStructCodec
- Type Parameters:
R
- the return typeP1
- the first parameter typeP2
- the second parameter typeP3
- the third parameter typeP4
- the fourth parameter typeP5
- the fifth parameter typeP6
- the sixth parameter typeP7
- the seventh parameter typeP8
- the eighth parameter typeP9
- the ninth parameter typeP10
- the tenth parameter typeP11
- the eleventh parameter typeP12
- the twelfth parameter typeP13
- the thirteenth parameter type- Parameters:
name1
- the name/key forStructCodec
codec1
- the codec forStructCodec
getter1
- the getter forStructCodec
name2
- the name/key forStructCodec
codec2
- the codec forStructCodec
getter2
- the getter forStructCodec
name3
- the name/key forStructCodec
codec3
- the codec forStructCodec
getter3
- the getter forStructCodec
name4
- the name/key forStructCodec
codec4
- the codec forStructCodec
getter4
- the getter forStructCodec
name5
- the name/key forStructCodec
codec5
- the codec forStructCodec
getter5
- the getter forStructCodec
name6
- the name/key forStructCodec
codec6
- the codec forStructCodec
getter6
- the getter forStructCodec
name7
- the name/key forStructCodec
codec7
- the codec forStructCodec
getter7
- the getter forStructCodec
name8
- the name/key forStructCodec
codec8
- the codec forStructCodec
getter8
- the getter forStructCodec
name9
- the name/key forStructCodec
codec9
- the codec forStructCodec
getter9
- the getter forStructCodec
name10
- the name/key forStructCodec
codec10
- the codec forStructCodec
getter10
- the getter forStructCodec
name11
- the name/key forStructCodec
codec11
- the codec forStructCodec
getter11
- the getter forStructCodec
name12
- the name/key forStructCodec
codec12
- the codec forStructCodec
getter12
- the getter forStructCodec
name13
- the name/key forStructCodec
codec13
- the codec forStructCodec
getter13
- the getter forStructCodec
ctor
- the constructor forStructCodec
- Returns:
- the new
StructCodec
template.
-
struct
static <R,P1 extends @UnknownNullability Object, StructCodec<R> structP2 extends @UnknownNullability Object, P3 extends @UnknownNullability Object, P4 extends @UnknownNullability Object, P5 extends @UnknownNullability Object, P6 extends @UnknownNullability Object, P7 extends @UnknownNullability Object, P8 extends @UnknownNullability Object, P9 extends @UnknownNullability Object, P10 extends @UnknownNullability Object, P11 extends @UnknownNullability Object, P12 extends @UnknownNullability Object, P13 extends @UnknownNullability Object, P14 extends @UnknownNullability Object> (String name1, Codec<P1> codec1, Function<R, P1> getter1, String name2, Codec<P2> codec2, Function<R, P2> getter2, String name3, Codec<P3> codec3, Function<R, P3> getter3, String name4, Codec<P4> codec4, Function<R, P4> getter4, String name5, Codec<P5> codec5, Function<R, P5> getter5, String name6, Codec<P6> codec6, Function<R, P6> getter6, String name7, Codec<P7> codec7, Function<R, P7> getter7, String name8, Codec<P8> codec8, Function<R, P8> getter8, String name9, Codec<P9> codec9, Function<R, P9> getter9, String name10, Codec<P10> codec10, Function<R, P10> getter10, String name11, Codec<P11> codec11, Function<R, P11> getter11, String name12, Codec<P12> codec12, Function<R, P12> getter12, String name13, Codec<P13> codec13, Function<R, P13> getter13, String name14, Codec<P14> codec14, Function<R, P14> getter14, NetworkBufferTemplate.F14<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, R> ctor) Creates a struct template. SeeStructCodec
- Type Parameters:
R
- the return typeP1
- the first parameter typeP2
- the second parameter typeP3
- the third parameter typeP4
- the fourth parameter typeP5
- the fifth parameter typeP6
- the sixth parameter typeP7
- the seventh parameter typeP8
- the eighth parameter typeP9
- the ninth parameter typeP10
- the tenth parameter typeP11
- the eleventh parameter typeP12
- the twelfth parameter typeP13
- the thirteenth parameter typeP14
- the fourteenth parameter type- Parameters:
name1
- the name/key forStructCodec
codec1
- the codec forStructCodec
getter1
- the getter forStructCodec
name2
- the name/key forStructCodec
codec2
- the codec forStructCodec
getter2
- the getter forStructCodec
name3
- the name/key forStructCodec
codec3
- the codec forStructCodec
getter3
- the getter forStructCodec
name4
- the name/key forStructCodec
codec4
- the codec forStructCodec
getter4
- the getter forStructCodec
name5
- the name/key forStructCodec
codec5
- the codec forStructCodec
getter5
- the getter forStructCodec
name6
- the name/key forStructCodec
codec6
- the codec forStructCodec
getter6
- the getter forStructCodec
name7
- the name/key forStructCodec
codec7
- the codec forStructCodec
getter7
- the getter forStructCodec
name8
- the name/key forStructCodec
codec8
- the codec forStructCodec
getter8
- the getter forStructCodec
name9
- the name/key forStructCodec
codec9
- the codec forStructCodec
getter9
- the getter forStructCodec
name10
- the name/key forStructCodec
codec10
- the codec forStructCodec
getter10
- the getter forStructCodec
name11
- the name/key forStructCodec
codec11
- the codec forStructCodec
getter11
- the getter forStructCodec
name12
- the name/key forStructCodec
codec12
- the codec forStructCodec
getter12
- the getter forStructCodec
name13
- the name/key forStructCodec
codec13
- the codec forStructCodec
getter13
- the getter forStructCodec
name14
- the name/key forStructCodec
codec14
- the codec forStructCodec
getter14
- the getter forStructCodec
ctor
- the constructor forStructCodec
- Returns:
- the new
StructCodec
template.
-
struct
static <R,P1 extends @UnknownNullability Object, StructCodec<R> structP2 extends @UnknownNullability Object, P3 extends @UnknownNullability Object, P4 extends @UnknownNullability Object, P5 extends @UnknownNullability Object, P6 extends @UnknownNullability Object, P7 extends @UnknownNullability Object, P8 extends @UnknownNullability Object, P9 extends @UnknownNullability Object, P10 extends @UnknownNullability Object, P11 extends @UnknownNullability Object, P12 extends @UnknownNullability Object, P13 extends @UnknownNullability Object, P14 extends @UnknownNullability Object, P15 extends @UnknownNullability Object> (String name1, Codec<P1> codec1, Function<R, P1> getter1, String name2, Codec<P2> codec2, Function<R, P2> getter2, String name3, Codec<P3> codec3, Function<R, P3> getter3, String name4, Codec<P4> codec4, Function<R, P4> getter4, String name5, Codec<P5> codec5, Function<R, P5> getter5, String name6, Codec<P6> codec6, Function<R, P6> getter6, String name7, Codec<P7> codec7, Function<R, P7> getter7, String name8, Codec<P8> codec8, Function<R, P8> getter8, String name9, Codec<P9> codec9, Function<R, P9> getter9, String name10, Codec<P10> codec10, Function<R, P10> getter10, String name11, Codec<P11> codec11, Function<R, P11> getter11, String name12, Codec<P12> codec12, Function<R, P12> getter12, String name13, Codec<P13> codec13, Function<R, P13> getter13, String name14, Codec<P14> codec14, Function<R, P14> getter14, String name15, Codec<P15> codec15, Function<R, P15> getter15, NetworkBufferTemplate.F15<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, R> ctor) Creates a struct template. SeeStructCodec
- Type Parameters:
R
- the return typeP1
- the first parameter typeP2
- the second parameter typeP3
- the third parameter typeP4
- the fourth parameter typeP5
- the fifth parameter typeP6
- the sixth parameter typeP7
- the seventh parameter typeP8
- the eighth parameter typeP9
- the ninth parameter typeP10
- the tenth parameter typeP11
- the eleventh parameter typeP12
- the twelfth parameter typeP13
- the thirteenth parameter typeP14
- the fourteenth parameter typeP15
- the fifteenth parameter type- Parameters:
name1
- the name/key forStructCodec
codec1
- the codec forStructCodec
getter1
- the getter forStructCodec
name2
- the name/key forStructCodec
codec2
- the codec forStructCodec
getter2
- the getter forStructCodec
name3
- the name/key forStructCodec
codec3
- the codec forStructCodec
getter3
- the getter forStructCodec
name4
- the name/key forStructCodec
codec4
- the codec forStructCodec
getter4
- the getter forStructCodec
name5
- the name/key forStructCodec
codec5
- the codec forStructCodec
getter5
- the getter forStructCodec
name6
- the name/key forStructCodec
codec6
- the codec forStructCodec
getter6
- the getter forStructCodec
name7
- the name/key forStructCodec
codec7
- the codec forStructCodec
getter7
- the getter forStructCodec
name8
- the name/key forStructCodec
codec8
- the codec forStructCodec
getter8
- the getter forStructCodec
name9
- the name/key forStructCodec
codec9
- the codec forStructCodec
getter9
- the getter forStructCodec
name10
- the name/key forStructCodec
codec10
- the codec forStructCodec
getter10
- the getter forStructCodec
name11
- the name/key forStructCodec
codec11
- the codec forStructCodec
getter11
- the getter forStructCodec
name12
- the name/key forStructCodec
codec12
- the codec forStructCodec
getter12
- the getter forStructCodec
name13
- the name/key forStructCodec
codec13
- the codec forStructCodec
getter13
- the getter forStructCodec
name14
- the name/key forStructCodec
codec14
- the codec forStructCodec
getter14
- the getter forStructCodec
name15
- the name/key forStructCodec
codec15
- the codec forStructCodec
getter15
- the getter forStructCodec
ctor
- the constructor forStructCodec
- Returns:
- the new
StructCodec
template.
-
struct
static <R,P1 extends @UnknownNullability Object, StructCodec<R> structP2 extends @UnknownNullability Object, P3 extends @UnknownNullability Object, P4 extends @UnknownNullability Object, P5 extends @UnknownNullability Object, P6 extends @UnknownNullability Object, P7 extends @UnknownNullability Object, P8 extends @UnknownNullability Object, P9 extends @UnknownNullability Object, P10 extends @UnknownNullability Object, P11 extends @UnknownNullability Object, P12 extends @UnknownNullability Object, P13 extends @UnknownNullability Object, P14 extends @UnknownNullability Object, P15 extends @UnknownNullability Object, P16 extends @UnknownNullability Object> (String name1, Codec<P1> codec1, Function<R, P1> getter1, String name2, Codec<P2> codec2, Function<R, P2> getter2, String name3, Codec<P3> codec3, Function<R, P3> getter3, String name4, Codec<P4> codec4, Function<R, P4> getter4, String name5, Codec<P5> codec5, Function<R, P5> getter5, String name6, Codec<P6> codec6, Function<R, P6> getter6, String name7, Codec<P7> codec7, Function<R, P7> getter7, String name8, Codec<P8> codec8, Function<R, P8> getter8, String name9, Codec<P9> codec9, Function<R, P9> getter9, String name10, Codec<P10> codec10, Function<R, P10> getter10, String name11, Codec<P11> codec11, Function<R, P11> getter11, String name12, Codec<P12> codec12, Function<R, P12> getter12, String name13, Codec<P13> codec13, Function<R, P13> getter13, String name14, Codec<P14> codec14, Function<R, P14> getter14, String name15, Codec<P15> codec15, Function<R, P15> getter15, String name16, Codec<P16> codec16, Function<R, P16> getter16, NetworkBufferTemplate.F16<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, R> ctor) Creates a struct template. SeeStructCodec
- Type Parameters:
R
- the return typeP1
- the first parameter typeP2
- the second parameter typeP3
- the third parameter typeP4
- the fourth parameter typeP5
- the fifth parameter typeP6
- the sixth parameter typeP7
- the seventh parameter typeP8
- the eighth parameter typeP9
- the ninth parameter typeP10
- the tenth parameter typeP11
- the eleventh parameter typeP12
- the twelfth parameter typeP13
- the thirteenth parameter typeP14
- the fourteenth parameter typeP15
- the fifteenth parameter typeP16
- the sixteenth parameter type- Parameters:
name1
- the name/key forStructCodec
codec1
- the codec forStructCodec
getter1
- the getter forStructCodec
name2
- the name/key forStructCodec
codec2
- the codec forStructCodec
getter2
- the getter forStructCodec
name3
- the name/key forStructCodec
codec3
- the codec forStructCodec
getter3
- the getter forStructCodec
name4
- the name/key forStructCodec
codec4
- the codec forStructCodec
getter4
- the getter forStructCodec
name5
- the name/key forStructCodec
codec5
- the codec forStructCodec
getter5
- the getter forStructCodec
name6
- the name/key forStructCodec
codec6
- the codec forStructCodec
getter6
- the getter forStructCodec
name7
- the name/key forStructCodec
codec7
- the codec forStructCodec
getter7
- the getter forStructCodec
name8
- the name/key forStructCodec
codec8
- the codec forStructCodec
getter8
- the getter forStructCodec
name9
- the name/key forStructCodec
codec9
- the codec forStructCodec
getter9
- the getter forStructCodec
name10
- the name/key forStructCodec
codec10
- the codec forStructCodec
getter10
- the getter forStructCodec
name11
- the name/key forStructCodec
codec11
- the codec forStructCodec
getter11
- the getter forStructCodec
name12
- the name/key forStructCodec
codec12
- the codec forStructCodec
getter12
- the getter forStructCodec
name13
- the name/key forStructCodec
codec13
- the codec forStructCodec
getter13
- the getter forStructCodec
name14
- the name/key forStructCodec
codec14
- the codec forStructCodec
getter14
- the getter forStructCodec
name15
- the name/key forStructCodec
codec15
- the codec forStructCodec
getter15
- the getter forStructCodec
name16
- the name/key forStructCodec
codec16
- the codec forStructCodec
getter16
- the getter forStructCodec
ctor
- the constructor forStructCodec
- Returns:
- the new
StructCodec
template.
-
struct
static <R,P1 extends @UnknownNullability Object, StructCodec<R> structP2 extends @UnknownNullability Object, P3 extends @UnknownNullability Object, P4 extends @UnknownNullability Object, P5 extends @UnknownNullability Object, P6 extends @UnknownNullability Object, P7 extends @UnknownNullability Object, P8 extends @UnknownNullability Object, P9 extends @UnknownNullability Object, P10 extends @UnknownNullability Object, P11 extends @UnknownNullability Object, P12 extends @UnknownNullability Object, P13 extends @UnknownNullability Object, P14 extends @UnknownNullability Object, P15 extends @UnknownNullability Object, P16 extends @UnknownNullability Object, P17 extends @UnknownNullability Object> (String name1, Codec<P1> codec1, Function<R, P1> getter1, String name2, Codec<P2> codec2, Function<R, P2> getter2, String name3, Codec<P3> codec3, Function<R, P3> getter3, String name4, Codec<P4> codec4, Function<R, P4> getter4, String name5, Codec<P5> codec5, Function<R, P5> getter5, String name6, Codec<P6> codec6, Function<R, P6> getter6, String name7, Codec<P7> codec7, Function<R, P7> getter7, String name8, Codec<P8> codec8, Function<R, P8> getter8, String name9, Codec<P9> codec9, Function<R, P9> getter9, String name10, Codec<P10> codec10, Function<R, P10> getter10, String name11, Codec<P11> codec11, Function<R, P11> getter11, String name12, Codec<P12> codec12, Function<R, P12> getter12, String name13, Codec<P13> codec13, Function<R, P13> getter13, String name14, Codec<P14> codec14, Function<R, P14> getter14, String name15, Codec<P15> codec15, Function<R, P15> getter15, String name16, Codec<P16> codec16, Function<R, P16> getter16, String name17, Codec<P17> codec17, Function<R, P17> getter17, NetworkBufferTemplate.F17<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, R> ctor) Creates a struct template. SeeStructCodec
- Type Parameters:
R
- the return typeP1
- the first parameter typeP2
- the second parameter typeP3
- the third parameter typeP4
- the fourth parameter typeP5
- the fifth parameter typeP6
- the sixth parameter typeP7
- the seventh parameter typeP8
- the eighth parameter typeP9
- the ninth parameter typeP10
- the tenth parameter typeP11
- the eleventh parameter typeP12
- the twelfth parameter typeP13
- the thirteenth parameter typeP14
- the fourteenth parameter typeP15
- the fifteenth parameter typeP16
- the sixteenth parameter typeP17
- the seventeenth parameter type- Parameters:
name1
- the name/key forStructCodec
codec1
- the codec forStructCodec
getter1
- the getter forStructCodec
name2
- the name/key forStructCodec
codec2
- the codec forStructCodec
getter2
- the getter forStructCodec
name3
- the name/key forStructCodec
codec3
- the codec forStructCodec
getter3
- the getter forStructCodec
name4
- the name/key forStructCodec
codec4
- the codec forStructCodec
getter4
- the getter forStructCodec
name5
- the name/key forStructCodec
codec5
- the codec forStructCodec
getter5
- the getter forStructCodec
name6
- the name/key forStructCodec
codec6
- the codec forStructCodec
getter6
- the getter forStructCodec
name7
- the name/key forStructCodec
codec7
- the codec forStructCodec
getter7
- the getter forStructCodec
name8
- the name/key forStructCodec
codec8
- the codec forStructCodec
getter8
- the getter forStructCodec
name9
- the name/key forStructCodec
codec9
- the codec forStructCodec
getter9
- the getter forStructCodec
name10
- the name/key forStructCodec
codec10
- the codec forStructCodec
getter10
- the getter forStructCodec
name11
- the name/key forStructCodec
codec11
- the codec forStructCodec
getter11
- the getter forStructCodec
name12
- the name/key forStructCodec
codec12
- the codec forStructCodec
getter12
- the getter forStructCodec
name13
- the name/key forStructCodec
codec13
- the codec forStructCodec
getter13
- the getter forStructCodec
name14
- the name/key forStructCodec
codec14
- the codec forStructCodec
getter14
- the getter forStructCodec
name15
- the name/key forStructCodec
codec15
- the codec forStructCodec
getter15
- the getter forStructCodec
name16
- the name/key forStructCodec
codec16
- the codec forStructCodec
getter16
- the getter forStructCodec
name17
- the name/key forStructCodec
codec17
- the codec forStructCodec
getter17
- the getter forStructCodec
ctor
- the constructor forStructCodec
- Returns:
- the new
StructCodec
template.
-
struct
static <R,P1 extends @UnknownNullability Object, StructCodec<R> structP2 extends @UnknownNullability Object, P3 extends @UnknownNullability Object, P4 extends @UnknownNullability Object, P5 extends @UnknownNullability Object, P6 extends @UnknownNullability Object, P7 extends @UnknownNullability Object, P8 extends @UnknownNullability Object, P9 extends @UnknownNullability Object, P10 extends @UnknownNullability Object, P11 extends @UnknownNullability Object, P12 extends @UnknownNullability Object, P13 extends @UnknownNullability Object, P14 extends @UnknownNullability Object, P15 extends @UnknownNullability Object, P16 extends @UnknownNullability Object, P17 extends @UnknownNullability Object, P18 extends @UnknownNullability Object> (String name1, Codec<P1> codec1, Function<R, P1> getter1, String name2, Codec<P2> codec2, Function<R, P2> getter2, String name3, Codec<P3> codec3, Function<R, P3> getter3, String name4, Codec<P4> codec4, Function<R, P4> getter4, String name5, Codec<P5> codec5, Function<R, P5> getter5, String name6, Codec<P6> codec6, Function<R, P6> getter6, String name7, Codec<P7> codec7, Function<R, P7> getter7, String name8, Codec<P8> codec8, Function<R, P8> getter8, String name9, Codec<P9> codec9, Function<R, P9> getter9, String name10, Codec<P10> codec10, Function<R, P10> getter10, String name11, Codec<P11> codec11, Function<R, P11> getter11, String name12, Codec<P12> codec12, Function<R, P12> getter12, String name13, Codec<P13> codec13, Function<R, P13> getter13, String name14, Codec<P14> codec14, Function<R, P14> getter14, String name15, Codec<P15> codec15, Function<R, P15> getter15, String name16, Codec<P16> codec16, Function<R, P16> getter16, String name17, Codec<P17> codec17, Function<R, P17> getter17, String name18, Codec<P18> codec18, Function<R, P18> getter18, NetworkBufferTemplate.F18<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, R> ctor) Creates a struct template. SeeStructCodec
- Type Parameters:
R
- the return typeP1
- the first parameter typeP2
- the second parameter typeP3
- the third parameter typeP4
- the fourth parameter typeP5
- the fifth parameter typeP6
- the sixth parameter typeP7
- the seventh parameter typeP8
- the eighth parameter typeP9
- the ninth parameter typeP10
- the tenth parameter typeP11
- the eleventh parameter typeP12
- the twelfth parameter typeP13
- the thirteenth parameter typeP14
- the fourteenth parameter typeP15
- the fifteenth parameter typeP16
- the sixteenth parameter typeP17
- the seventeenth parameter typeP18
- the eighteenth parameter type- Parameters:
name1
- the name/key forStructCodec
codec1
- the codec forStructCodec
getter1
- the getter forStructCodec
name2
- the name/key forStructCodec
codec2
- the codec forStructCodec
getter2
- the getter forStructCodec
name3
- the name/key forStructCodec
codec3
- the codec forStructCodec
getter3
- the getter forStructCodec
name4
- the name/key forStructCodec
codec4
- the codec forStructCodec
getter4
- the getter forStructCodec
name5
- the name/key forStructCodec
codec5
- the codec forStructCodec
getter5
- the getter forStructCodec
name6
- the name/key forStructCodec
codec6
- the codec forStructCodec
getter6
- the getter forStructCodec
name7
- the name/key forStructCodec
codec7
- the codec forStructCodec
getter7
- the getter forStructCodec
name8
- the name/key forStructCodec
codec8
- the codec forStructCodec
getter8
- the getter forStructCodec
name9
- the name/key forStructCodec
codec9
- the codec forStructCodec
getter9
- the getter forStructCodec
name10
- the name/key forStructCodec
codec10
- the codec forStructCodec
getter10
- the getter forStructCodec
name11
- the name/key forStructCodec
codec11
- the codec forStructCodec
getter11
- the getter forStructCodec
name12
- the name/key forStructCodec
codec12
- the codec forStructCodec
getter12
- the getter forStructCodec
name13
- the name/key forStructCodec
codec13
- the codec forStructCodec
getter13
- the getter forStructCodec
name14
- the name/key forStructCodec
codec14
- the codec forStructCodec
getter14
- the getter forStructCodec
name15
- the name/key forStructCodec
codec15
- the codec forStructCodec
getter15
- the getter forStructCodec
name16
- the name/key forStructCodec
codec16
- the codec forStructCodec
getter16
- the getter forStructCodec
name17
- the name/key forStructCodec
codec17
- the codec forStructCodec
getter17
- the getter forStructCodec
name18
- the name/key forStructCodec
codec18
- the codec forStructCodec
getter18
- the getter forStructCodec
ctor
- the constructor forStructCodec
- Returns:
- the new
StructCodec
template.
-
struct
static <R,P1 extends @UnknownNullability Object, StructCodec<R> structP2 extends @UnknownNullability Object, P3 extends @UnknownNullability Object, P4 extends @UnknownNullability Object, P5 extends @UnknownNullability Object, P6 extends @UnknownNullability Object, P7 extends @UnknownNullability Object, P8 extends @UnknownNullability Object, P9 extends @UnknownNullability Object, P10 extends @UnknownNullability Object, P11 extends @UnknownNullability Object, P12 extends @UnknownNullability Object, P13 extends @UnknownNullability Object, P14 extends @UnknownNullability Object, P15 extends @UnknownNullability Object, P16 extends @UnknownNullability Object, P17 extends @UnknownNullability Object, P18 extends @UnknownNullability Object, P19 extends @UnknownNullability Object> (String name1, Codec<P1> codec1, Function<R, P1> getter1, String name2, Codec<P2> codec2, Function<R, P2> getter2, String name3, Codec<P3> codec3, Function<R, P3> getter3, String name4, Codec<P4> codec4, Function<R, P4> getter4, String name5, Codec<P5> codec5, Function<R, P5> getter5, String name6, Codec<P6> codec6, Function<R, P6> getter6, String name7, Codec<P7> codec7, Function<R, P7> getter7, String name8, Codec<P8> codec8, Function<R, P8> getter8, String name9, Codec<P9> codec9, Function<R, P9> getter9, String name10, Codec<P10> codec10, Function<R, P10> getter10, String name11, Codec<P11> codec11, Function<R, P11> getter11, String name12, Codec<P12> codec12, Function<R, P12> getter12, String name13, Codec<P13> codec13, Function<R, P13> getter13, String name14, Codec<P14> codec14, Function<R, P14> getter14, String name15, Codec<P15> codec15, Function<R, P15> getter15, String name16, Codec<P16> codec16, Function<R, P16> getter16, String name17, Codec<P17> codec17, Function<R, P17> getter17, String name18, Codec<P18> codec18, Function<R, P18> getter18, String name19, Codec<P19> codec19, Function<R, P19> getter19, NetworkBufferTemplate.F19<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, R> ctor) Creates a struct template. SeeStructCodec
- Type Parameters:
R
- the return typeP1
- the first parameter typeP2
- the second parameter typeP3
- the third parameter typeP4
- the fourth parameter typeP5
- the fifth parameter typeP6
- the sixth parameter typeP7
- the seventh parameter typeP8
- the eighth parameter typeP9
- the ninth parameter typeP10
- the tenth parameter typeP11
- the eleventh parameter typeP12
- the twelfth parameter typeP13
- the thirteenth parameter typeP14
- the fourteenth parameter typeP15
- the fifteenth parameter typeP16
- the sixteenth parameter typeP17
- the seventeenth parameter typeP18
- the eighteenth parameter typeP19
- the nineteenth parameter type- Parameters:
name1
- the name/key forStructCodec
codec1
- the codec forStructCodec
getter1
- the getter forStructCodec
name2
- the name/key forStructCodec
codec2
- the codec forStructCodec
getter2
- the getter forStructCodec
name3
- the name/key forStructCodec
codec3
- the codec forStructCodec
getter3
- the getter forStructCodec
name4
- the name/key forStructCodec
codec4
- the codec forStructCodec
getter4
- the getter forStructCodec
name5
- the name/key forStructCodec
codec5
- the codec forStructCodec
getter5
- the getter forStructCodec
name6
- the name/key forStructCodec
codec6
- the codec forStructCodec
getter6
- the getter forStructCodec
name7
- the name/key forStructCodec
codec7
- the codec forStructCodec
getter7
- the getter forStructCodec
name8
- the name/key forStructCodec
codec8
- the codec forStructCodec
getter8
- the getter forStructCodec
name9
- the name/key forStructCodec
codec9
- the codec forStructCodec
getter9
- the getter forStructCodec
name10
- the name/key forStructCodec
codec10
- the codec forStructCodec
getter10
- the getter forStructCodec
name11
- the name/key forStructCodec
codec11
- the codec forStructCodec
getter11
- the getter forStructCodec
name12
- the name/key forStructCodec
codec12
- the codec forStructCodec
getter12
- the getter forStructCodec
name13
- the name/key forStructCodec
codec13
- the codec forStructCodec
getter13
- the getter forStructCodec
name14
- the name/key forStructCodec
codec14
- the codec forStructCodec
getter14
- the getter forStructCodec
name15
- the name/key forStructCodec
codec15
- the codec forStructCodec
getter15
- the getter forStructCodec
name16
- the name/key forStructCodec
codec16
- the codec forStructCodec
getter16
- the getter forStructCodec
name17
- the name/key forStructCodec
codec17
- the codec forStructCodec
getter17
- the getter forStructCodec
name18
- the name/key forStructCodec
codec18
- the codec forStructCodec
getter18
- the getter forStructCodec
name19
- the name/key forStructCodec
codec19
- the codec forStructCodec
getter19
- the getter forStructCodec
ctor
- the constructor forStructCodec
- Returns:
- the new
StructCodec
template.
-
struct
static <R,P1 extends @UnknownNullability Object, StructCodec<R> structP2 extends @UnknownNullability Object, P3 extends @UnknownNullability Object, P4 extends @UnknownNullability Object, P5 extends @UnknownNullability Object, P6 extends @UnknownNullability Object, P7 extends @UnknownNullability Object, P8 extends @UnknownNullability Object, P9 extends @UnknownNullability Object, P10 extends @UnknownNullability Object, P11 extends @UnknownNullability Object, P12 extends @UnknownNullability Object, P13 extends @UnknownNullability Object, P14 extends @UnknownNullability Object, P15 extends @UnknownNullability Object, P16 extends @UnknownNullability Object, P17 extends @UnknownNullability Object, P18 extends @UnknownNullability Object, P19 extends @UnknownNullability Object, P20 extends @UnknownNullability Object> (String name1, Codec<P1> codec1, Function<R, P1> getter1, String name2, Codec<P2> codec2, Function<R, P2> getter2, String name3, Codec<P3> codec3, Function<R, P3> getter3, String name4, Codec<P4> codec4, Function<R, P4> getter4, String name5, Codec<P5> codec5, Function<R, P5> getter5, String name6, Codec<P6> codec6, Function<R, P6> getter6, String name7, Codec<P7> codec7, Function<R, P7> getter7, String name8, Codec<P8> codec8, Function<R, P8> getter8, String name9, Codec<P9> codec9, Function<R, P9> getter9, String name10, Codec<P10> codec10, Function<R, P10> getter10, String name11, Codec<P11> codec11, Function<R, P11> getter11, String name12, Codec<P12> codec12, Function<R, P12> getter12, String name13, Codec<P13> codec13, Function<R, P13> getter13, String name14, Codec<P14> codec14, Function<R, P14> getter14, String name15, Codec<P15> codec15, Function<R, P15> getter15, String name16, Codec<P16> codec16, Function<R, P16> getter16, String name17, Codec<P17> codec17, Function<R, P17> getter17, String name18, Codec<P18> codec18, Function<R, P18> getter18, String name19, Codec<P19> codec19, Function<R, P19> getter19, String name20, Codec<P20> codec20, Function<R, P20> getter20, NetworkBufferTemplate.F20<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, R> ctor) Creates a struct template. SeeStructCodec
- Type Parameters:
R
- the return typeP1
- the first parameter typeP2
- the second parameter typeP3
- the third parameter typeP4
- the fourth parameter typeP5
- the fifth parameter typeP6
- the sixth parameter typeP7
- the seventh parameter typeP8
- the eighth parameter typeP9
- the ninth parameter typeP10
- the tenth parameter typeP11
- the eleventh parameter typeP12
- the twelfth parameter typeP13
- the thirteenth parameter typeP14
- the fourteenth parameter typeP15
- the fifteenth parameter typeP16
- the sixteenth parameter typeP17
- the seventeenth parameter typeP18
- the eighteenth parameter typeP19
- the nineteenth parameter typeP20
- the twentieth parameter type- Parameters:
name1
- the name/key forStructCodec
codec1
- the codec forStructCodec
getter1
- the getter forStructCodec
name2
- the name/key forStructCodec
codec2
- the codec forStructCodec
getter2
- the getter forStructCodec
name3
- the name/key forStructCodec
codec3
- the codec forStructCodec
getter3
- the getter forStructCodec
name4
- the name/key forStructCodec
codec4
- the codec forStructCodec
getter4
- the getter forStructCodec
name5
- the name/key forStructCodec
codec5
- the codec forStructCodec
getter5
- the getter forStructCodec
name6
- the name/key forStructCodec
codec6
- the codec forStructCodec
getter6
- the getter forStructCodec
name7
- the name/key forStructCodec
codec7
- the codec forStructCodec
getter7
- the getter forStructCodec
name8
- the name/key forStructCodec
codec8
- the codec forStructCodec
getter8
- the getter forStructCodec
name9
- the name/key forStructCodec
codec9
- the codec forStructCodec
getter9
- the getter forStructCodec
name10
- the name/key forStructCodec
codec10
- the codec forStructCodec
getter10
- the getter forStructCodec
name11
- the name/key forStructCodec
codec11
- the codec forStructCodec
getter11
- the getter forStructCodec
name12
- the name/key forStructCodec
codec12
- the codec forStructCodec
getter12
- the getter forStructCodec
name13
- the name/key forStructCodec
codec13
- the codec forStructCodec
getter13
- the getter forStructCodec
name14
- the name/key forStructCodec
codec14
- the codec forStructCodec
getter14
- the getter forStructCodec
name15
- the name/key forStructCodec
codec15
- the codec forStructCodec
getter15
- the getter forStructCodec
name16
- the name/key forStructCodec
codec16
- the codec forStructCodec
getter16
- the getter forStructCodec
name17
- the name/key forStructCodec
codec17
- the codec forStructCodec
getter17
- the getter forStructCodec
name18
- the name/key forStructCodec
codec18
- the codec forStructCodec
getter18
- the getter forStructCodec
name19
- the name/key forStructCodec
codec19
- the codec forStructCodec
getter19
- the getter forStructCodec
name20
- the name/key forStructCodec
codec20
- the codec forStructCodec
getter20
- the getter forStructCodec
ctor
- the constructor forStructCodec
- Returns:
- the new
StructCodec
template.
-