Class TupleCodecs.Tuple4Codec<A,B,C,D_TYPE>
java.lang.Object
com.github.darksoulq.abyssallib.common.serialization.codecs.TupleCodecs.Tuple4Codec<A,B,C,D_TYPE>
- Type Parameters:
A- First element type.B- Second element type.C- Third element type.D_TYPE- Fourth element type.
- All Implemented Interfaces:
Codec<Codec.Tuple4<A,B, C, D_TYPE>>
- Enclosing class:
TupleCodecs
public static class TupleCodecs.Tuple4Codec<A,B,C,D_TYPE>
extends Object
implements Codec<Codec.Tuple4<A,B,C,D_TYPE>>
Codec for a four-element tuple.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.github.darksoulq.abyssallib.common.serialization.Codec
Codec.Decoder<T>, Codec.Encoder<T>, Codec.Pair<A,B>, Codec.Tuple3<A, B, C>, Codec.Tuple4<A, B, C, D> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<R> Raccept(CodecVisitor<R> visitor) Routes this instance into the visitor API to construct contextual schema layouts.<D> DataResult<Codec.Tuple4<A, B, C, D_TYPE>> decode(DynamicOps<D> ops, D input) Decodes a serialized input of a specific data format into a Java object.describe()Outputs a structural description of the expected format for this codec.<D> DataResult<D> encode(DynamicOps<D> ops, Codec.Tuple4<A, B, C, D_TYPE> value) Encodes a Java object into its serialized representation.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.github.darksoulq.abyssallib.common.serialization.Codec
collection, comapFlatMap, decodeAsync, describe, encodeAsync, fieldOf, flatComapMap, flatXmap, immutableList, immutableSet, list, maxLength, minLength, nullable, oneOf, optional, optionalFieldOf, optionalFieldOf, orElse, positive, range, regex, restrict, schema, set, structuralEquals, transform, unchecked, validate, validate, versioned, withSchema, xmap
-
Constructor Details
-
Tuple4Codec
Creates a four-element tuple codec.- Parameters:
first- Codec for the first element.second- Codec for the second element.third- Codec for the third element.fourth- Codec for the fourth element.
-
-
Method Details
-
decode
Description copied from interface:CodecDecodes a serialized input of a specific data format into a Java object. -
encode
Description copied from interface:CodecEncodes a Java object into its serialized representation. -
describe
Description copied from interface:CodecOutputs a structural description of the expected format for this codec. Useful for schema generation and validation debugging. -
accept
Description copied from interface:CodecRoutes this instance into the visitor API to construct contextual schema layouts.
-