Interface StructCodec<R>
- 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 Codec
Codec.RawValue -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringA special key used to instruct the codec to inline the value instead of wrapping it in a map.Fields inherited from interface 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 ofDusing the specificTranscoder
TheResultwill be ofResult.OkorResult.Errorand its typedTdecodeFromMap(Transcoder<D> coder, Transcoder.MapLike<D> map) default <D> Result<D> encode(Transcoder<D> coder, R value) Encodes a value ofTusing the specificTranscoder
TheResultwill be ofResult.OkorResult.Errorand its typedD<D> Result<D> encodeToMap(Transcoder<D> coder, R value, Transcoder.MapBuilder<D> map) 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
- Type Parameters:
D- the transcoder type- Parameters:
coder- the transcoder forDmap- the map to decode from- Returns:
- the result of decoding
-
encodeToMap
-
decode
Decodes a value ofDusing the specificTranscoder
TheResultwill be ofResult.OkorResult.Errorand its typedT -
encode
Encodes a value ofTusing the specificTranscoder
TheResultwill be ofResult.OkorResult.Errorand its typedD -
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 ofR- 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 ofR- 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 forP1codec1- the codec forP1getter1- the getter forP1ctor- the constructor forR- Returns:
- the new
StructCodectemplate.
-
struct
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. SeeStructCodec- Type Parameters:
R- the return typeP1- the first parameter typeP2- the second parameter type- Parameters:
name1- the name/key forP1codec1- the codec forP1getter1- the getter forP1name2- the name/key forP2codec2- the codec forP2getter2- the getter forP2ctor- the constructor forR- Returns:
- the new
StructCodectemplate.
-
struct
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. SeeStructCodec- Type Parameters:
R- the return typeP1- the first parameter typeP2- the second parameter typeP3- the third parameter type- Parameters:
name1- the name/key forP1codec1- the codec forP1getter1- the getter forP1name2- the name/key forP2codec2- the codec forP2getter2- the getter forP2name3- the name/key forP3codec3- the codec forP3getter3- the getter forP3ctor- the constructor forR- Returns:
- the new
StructCodectemplate.
-
struct
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. 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 forP1codec1- the codec forP1getter1- the getter forP1name2- the name/key forP2codec2- the codec forP2getter2- the getter forP2name3- the name/key forP3codec3- the codec forP3getter3- the getter forP3name4- the name/key forP4codec4- the codec forP4getter4- the getter forP4ctor- the constructor forR- Returns:
- the new
StructCodectemplate.
-
struct
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. 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 forP1codec1- the codec forP1getter1- the getter forP1name2- the name/key forP2codec2- the codec forP2getter2- the getter forP2name3- the name/key forP3codec3- the codec forP3getter3- the getter forP3name4- the name/key forP4codec4- the codec forP4getter4- the getter forP4name5- the name/key forP5codec5- the codec forP5getter5- the getter forP5ctor- the constructor forR- Returns:
- the new
StructCodectemplate.
-
struct
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. 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 forP1codec1- the codec forP1getter1- the getter forP1name2- the name/key forP2codec2- the codec forP2getter2- the getter forP2name3- the name/key forP3codec3- the codec forP3getter3- the getter forP3name4- the name/key forP4codec4- the codec forP4getter4- the getter forP4name5- the name/key forP5codec5- the codec forP5getter5- the getter forP5name6- the name/key forP6codec6- the codec forP6getter6- the getter forP6ctor- the constructor forR- Returns:
- the new
StructCodectemplate.
-
struct
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. 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 forP1codec1- the codec forP1getter1- the getter forP1name2- the name/key forP2codec2- the codec forP2getter2- the getter forP2name3- the name/key forP3codec3- the codec forP3getter3- the getter forP3name4- the name/key forP4codec4- the codec forP4getter4- the getter forP4name5- the name/key forP5codec5- the codec forP5getter5- the getter forP5name6- the name/key forP6codec6- the codec forP6getter6- the getter forP6name7- the name/key forP7codec7- the codec forP7getter7- the getter forP7ctor- the constructor forR- Returns:
- the new
StructCodectemplate.
-
struct
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. 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 forP1codec1- the codec forP1getter1- the getter forP1name2- the name/key forP2codec2- the codec forP2getter2- the getter forP2name3- the name/key forP3codec3- the codec forP3getter3- the getter forP3name4- the name/key forP4codec4- the codec forP4getter4- the getter forP4name5- the name/key forP5codec5- the codec forP5getter5- the getter forP5name6- the name/key forP6codec6- the codec forP6getter6- the getter forP6name7- the name/key forP7codec7- the codec forP7getter7- the getter forP7name8- the name/key forP8codec8- the codec forP8getter8- the getter forP8ctor- the constructor forR- Returns:
- the new
StructCodectemplate.
-
struct
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. 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 forP1codec1- the codec forP1getter1- the getter forP1name2- the name/key forP2codec2- the codec forP2getter2- the getter forP2name3- the name/key forP3codec3- the codec forP3getter3- the getter forP3name4- the name/key forP4codec4- the codec forP4getter4- the getter forP4name5- the name/key forP5codec5- the codec forP5getter5- the getter forP5name6- the name/key forP6codec6- the codec forP6getter6- the getter forP6name7- the name/key forP7codec7- the codec forP7getter7- the getter forP7name8- the name/key forP8codec8- the codec forP8getter8- the getter forP8name9- the name/key forP9codec9- the codec forP9getter9- the getter forP9ctor- the constructor forR- Returns:
- the new
StructCodectemplate.
-
struct
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. 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 forP1codec1- the codec forP1getter1- the getter forP1name2- the name/key forP2codec2- the codec forP2getter2- the getter forP2name3- the name/key forP3codec3- the codec forP3getter3- the getter forP3name4- the name/key forP4codec4- the codec forP4getter4- the getter forP4name5- the name/key forP5codec5- the codec forP5getter5- the getter forP5name6- the name/key forP6codec6- the codec forP6getter6- the getter forP6name7- the name/key forP7codec7- the codec forP7getter7- the getter forP7name8- the name/key forP8codec8- the codec forP8getter8- the getter forP8name9- the name/key forP9codec9- the codec forP9getter9- the getter forP9name10- the name/key forP10codec10- the codec forP10getter10- the getter forP10ctor- the constructor forR- Returns:
- the new
StructCodectemplate.
-
struct
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. 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 forP1codec1- the codec forP1getter1- the getter forP1name2- the name/key forP2codec2- the codec forP2getter2- the getter forP2name3- the name/key forP3codec3- the codec forP3getter3- the getter forP3name4- the name/key forP4codec4- the codec forP4getter4- the getter forP4name5- the name/key forP5codec5- the codec forP5getter5- the getter forP5name6- the name/key forP6codec6- the codec forP6getter6- the getter forP6name7- the name/key forP7codec7- the codec forP7getter7- the getter forP7name8- the name/key forP8codec8- the codec forP8getter8- the getter forP8name9- the name/key forP9codec9- the codec forP9getter9- the getter forP9name10- the name/key forP10codec10- the codec forP10getter10- the getter forP10name11- the name/key forP11codec11- the codec forP11getter11- the getter forP11ctor- the constructor forR- Returns:
- the new
StructCodectemplate.
-
struct
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. 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 forP1codec1- the codec forP1getter1- the getter forP1name2- the name/key forP2codec2- the codec forP2getter2- the getter forP2name3- the name/key forP3codec3- the codec forP3getter3- the getter forP3name4- the name/key forP4codec4- the codec forP4getter4- the getter forP4name5- the name/key forP5codec5- the codec forP5getter5- the getter forP5name6- the name/key forP6codec6- the codec forP6getter6- the getter forP6name7- the name/key forP7codec7- the codec forP7getter7- the getter forP7name8- the name/key forP8codec8- the codec forP8getter8- the getter forP8name9- the name/key forP9codec9- the codec forP9getter9- the getter forP9name10- the name/key forP10codec10- the codec forP10getter10- the getter forP10name11- the name/key forP11codec11- the codec forP11getter11- the getter forP11name12- the name/key forP12codec12- the codec forP12getter12- the getter forP12ctor- the constructor forR- Returns:
- the new
StructCodectemplate.
-
struct
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. 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 forP1codec1- the codec forP1getter1- the getter forP1name2- the name/key forP2codec2- the codec forP2getter2- the getter forP2name3- the name/key forP3codec3- the codec forP3getter3- the getter forP3name4- the name/key forP4codec4- the codec forP4getter4- the getter forP4name5- the name/key forP5codec5- the codec forP5getter5- the getter forP5name6- the name/key forP6codec6- the codec forP6getter6- the getter forP6name7- the name/key forP7codec7- the codec forP7getter7- the getter forP7name8- the name/key forP8codec8- the codec forP8getter8- the getter forP8name9- the name/key forP9codec9- the codec forP9getter9- the getter forP9name10- the name/key forP10codec10- the codec forP10getter10- the getter forP10name11- the name/key forP11codec11- the codec forP11getter11- the getter forP11name12- the name/key forP12codec12- the codec forP12getter12- the getter forP12name13- the name/key forP13codec13- the codec forP13getter13- the getter forP13ctor- the constructor forR- Returns:
- the new
StructCodectemplate.
-
struct
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. 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 forP1codec1- the codec forP1getter1- the getter forP1name2- the name/key forP2codec2- the codec forP2getter2- the getter forP2name3- the name/key forP3codec3- the codec forP3getter3- the getter forP3name4- the name/key forP4codec4- the codec forP4getter4- the getter forP4name5- the name/key forP5codec5- the codec forP5getter5- the getter forP5name6- the name/key forP6codec6- the codec forP6getter6- the getter forP6name7- the name/key forP7codec7- the codec forP7getter7- the getter forP7name8- the name/key forP8codec8- the codec forP8getter8- the getter forP8name9- the name/key forP9codec9- the codec forP9getter9- the getter forP9name10- the name/key forP10codec10- the codec forP10getter10- the getter forP10name11- the name/key forP11codec11- the codec forP11getter11- the getter forP11name12- the name/key forP12codec12- the codec forP12getter12- the getter forP12name13- the name/key forP13codec13- the codec forP13getter13- the getter forP13name14- the name/key forP14codec14- the codec forP14getter14- the getter forP14ctor- the constructor forR- Returns:
- the new
StructCodectemplate.
-
struct
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. 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 forP1codec1- the codec forP1getter1- the getter forP1name2- the name/key forP2codec2- the codec forP2getter2- the getter forP2name3- the name/key forP3codec3- the codec forP3getter3- the getter forP3name4- the name/key forP4codec4- the codec forP4getter4- the getter forP4name5- the name/key forP5codec5- the codec forP5getter5- the getter forP5name6- the name/key forP6codec6- the codec forP6getter6- the getter forP6name7- the name/key forP7codec7- the codec forP7getter7- the getter forP7name8- the name/key forP8codec8- the codec forP8getter8- the getter forP8name9- the name/key forP9codec9- the codec forP9getter9- the getter forP9name10- the name/key forP10codec10- the codec forP10getter10- the getter forP10name11- the name/key forP11codec11- the codec forP11getter11- the getter forP11name12- the name/key forP12codec12- the codec forP12getter12- the getter forP12name13- the name/key forP13codec13- the codec forP13getter13- the getter forP13name14- the name/key forP14codec14- the codec forP14getter14- the getter forP14name15- the name/key forP15codec15- the codec forP15getter15- the getter forP15ctor- the constructor forR- Returns:
- the new
StructCodectemplate.
-
struct
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. 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 forP1codec1- the codec forP1getter1- the getter forP1name2- the name/key forP2codec2- the codec forP2getter2- the getter forP2name3- the name/key forP3codec3- the codec forP3getter3- the getter forP3name4- the name/key forP4codec4- the codec forP4getter4- the getter forP4name5- the name/key forP5codec5- the codec forP5getter5- the getter forP5name6- the name/key forP6codec6- the codec forP6getter6- the getter forP6name7- the name/key forP7codec7- the codec forP7getter7- the getter forP7name8- the name/key forP8codec8- the codec forP8getter8- the getter forP8name9- the name/key forP9codec9- the codec forP9getter9- the getter forP9name10- the name/key forP10codec10- the codec forP10getter10- the getter forP10name11- the name/key forP11codec11- the codec forP11getter11- the getter forP11name12- the name/key forP12codec12- the codec forP12getter12- the getter forP12name13- the name/key forP13codec13- the codec forP13getter13- the getter forP13name14- the name/key forP14codec14- the codec forP14getter14- the getter forP14name15- the name/key forP15codec15- the codec forP15getter15- the getter forP15name16- the name/key forP16codec16- the codec forP16getter16- the getter forP16ctor- the constructor forR- Returns:
- the new
StructCodectemplate.
-
struct
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. 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 forP1codec1- the codec forP1getter1- the getter forP1name2- the name/key forP2codec2- the codec forP2getter2- the getter forP2name3- the name/key forP3codec3- the codec forP3getter3- the getter forP3name4- the name/key forP4codec4- the codec forP4getter4- the getter forP4name5- the name/key forP5codec5- the codec forP5getter5- the getter forP5name6- the name/key forP6codec6- the codec forP6getter6- the getter forP6name7- the name/key forP7codec7- the codec forP7getter7- the getter forP7name8- the name/key forP8codec8- the codec forP8getter8- the getter forP8name9- the name/key forP9codec9- the codec forP9getter9- the getter forP9name10- the name/key forP10codec10- the codec forP10getter10- the getter forP10name11- the name/key forP11codec11- the codec forP11getter11- the getter forP11name12- the name/key forP12codec12- the codec forP12getter12- the getter forP12name13- the name/key forP13codec13- the codec forP13getter13- the getter forP13name14- the name/key forP14codec14- the codec forP14getter14- the getter forP14name15- the name/key forP15codec15- the codec forP15getter15- the getter forP15name16- the name/key forP16codec16- the codec forP16getter16- the getter forP16name17- the name/key forP17codec17- the codec forP17getter17- the getter forP17ctor- the constructor forR- Returns:
- the new
StructCodectemplate.
-
struct
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. 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 forP1codec1- the codec forP1getter1- the getter forP1name2- the name/key forP2codec2- the codec forP2getter2- the getter forP2name3- the name/key forP3codec3- the codec forP3getter3- the getter forP3name4- the name/key forP4codec4- the codec forP4getter4- the getter forP4name5- the name/key forP5codec5- the codec forP5getter5- the getter forP5name6- the name/key forP6codec6- the codec forP6getter6- the getter forP6name7- the name/key forP7codec7- the codec forP7getter7- the getter forP7name8- the name/key forP8codec8- the codec forP8getter8- the getter forP8name9- the name/key forP9codec9- the codec forP9getter9- the getter forP9name10- the name/key forP10codec10- the codec forP10getter10- the getter forP10name11- the name/key forP11codec11- the codec forP11getter11- the getter forP11name12- the name/key forP12codec12- the codec forP12getter12- the getter forP12name13- the name/key forP13codec13- the codec forP13getter13- the getter forP13name14- the name/key forP14codec14- the codec forP14getter14- the getter forP14name15- the name/key forP15codec15- the codec forP15getter15- the getter forP15name16- the name/key forP16codec16- the codec forP16getter16- the getter forP16name17- the name/key forP17codec17- the codec forP17getter17- the getter forP17name18- the name/key forP18codec18- the codec forP18getter18- the getter forP18ctor- the constructor forR- Returns:
- the new
StructCodectemplate.
-
struct
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. 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 forP1codec1- the codec forP1getter1- the getter forP1name2- the name/key forP2codec2- the codec forP2getter2- the getter forP2name3- the name/key forP3codec3- the codec forP3getter3- the getter forP3name4- the name/key forP4codec4- the codec forP4getter4- the getter forP4name5- the name/key forP5codec5- the codec forP5getter5- the getter forP5name6- the name/key forP6codec6- the codec forP6getter6- the getter forP6name7- the name/key forP7codec7- the codec forP7getter7- the getter forP7name8- the name/key forP8codec8- the codec forP8getter8- the getter forP8name9- the name/key forP9codec9- the codec forP9getter9- the getter forP9name10- the name/key forP10codec10- the codec forP10getter10- the getter forP10name11- the name/key forP11codec11- the codec forP11getter11- the getter forP11name12- the name/key forP12codec12- the codec forP12getter12- the getter forP12name13- the name/key forP13codec13- the codec forP13getter13- the getter forP13name14- the name/key forP14codec14- the codec forP14getter14- the getter forP14name15- the name/key forP15codec15- the codec forP15getter15- the getter forP15name16- the name/key forP16codec16- the codec forP16getter16- the getter forP16name17- the name/key forP17codec17- the codec forP17getter17- the getter forP17name18- the name/key forP18codec18- the codec forP18getter18- the getter forP18name19- the name/key forP19codec19- the codec forP19getter19- the getter forP19ctor- the constructor forR- Returns:
- the new
StructCodectemplate.
-
struct
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. 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 forP1codec1- the codec forP1getter1- the getter forP1name2- the name/key forP2codec2- the codec forP2getter2- the getter forP2name3- the name/key forP3codec3- the codec forP3getter3- the getter forP3name4- the name/key forP4codec4- the codec forP4getter4- the getter forP4name5- the name/key forP5codec5- the codec forP5getter5- the getter forP5name6- the name/key forP6codec6- the codec forP6getter6- the getter forP6name7- the name/key forP7codec7- the codec forP7getter7- the getter forP7name8- the name/key forP8codec8- the codec forP8getter8- the getter forP8name9- the name/key forP9codec9- the codec forP9getter9- the getter forP9name10- the name/key forP10codec10- the codec forP10getter10- the getter forP10name11- the name/key forP11codec11- the codec forP11getter11- the getter forP11name12- the name/key forP12codec12- the codec forP12getter12- the getter forP12name13- the name/key forP13codec13- the codec forP13getter13- the getter forP13name14- the name/key forP14codec14- the codec forP14getter14- the getter forP14name15- the name/key forP15codec15- the codec forP15getter15- the getter forP15name16- the name/key forP16codec16- the codec forP16getter16- the getter forP16name17- the name/key forP17codec17- the codec forP17getter17- the getter forP17name18- the name/key forP18codec18- the codec forP18getter18- the getter forP18name19- the name/key forP19codec19- the codec forP19getter19- the getter forP19name20- the name/key forP20codec20- the codec forP20getter20- the getter forP20ctor- the constructor forR- Returns:
- the new
StructCodectemplate.
-