Record Class MapCodec.MapCodecCodec<A>
java.lang.Object
java.lang.Record
com.mojang.serialization.MapCodec.MapCodecCodec<A>
-
Nested Class Summary
Nested classes/interfaces inherited from interface Codec
Codec.RecursiveCodec<T>, Codec.ResultFunction<A>Nested classes/interfaces inherited from interface Decoder
Decoder.Boxed<A>, Decoder.Simple<A>, Decoder.Terminal<A> -
Field Summary
FieldsModifier and TypeFieldDescriptionThe field for thecodecrecord component.Fields inherited from interface Codec
BOOL, BYTE, BYTE_BUFFER, DOUBLE, EMPTY, FLOAT, INT, INT_STREAM, LONG, LONG_STREAM, PASSTHROUGH, SHORT, STRING -
Constructor Summary
ConstructorsConstructorDescriptionMapCodecCodec(MapCodec<A> codec) Creates an instance of aMapCodecCodecrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncodec()Returns the value of thecodecrecord component.<T> DataResult<Pair<A, T>> decode(DynamicOps<T> ops, T input) <T> DataResult<T> encode(A input, DynamicOps<T> ops, T prefix) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.toString()Returns a string representation of this record class.Methods inherited from interface Codec
comapFlatMap, deprecated, dispatch, dispatch, dispatchMap, dispatchMap, dispatchStable, fieldOf, flatComapMap, flatXmap, lenientOptionalFieldOf, lenientOptionalFieldOf, lenientOptionalFieldOf, lenientOptionalFieldOf, listOf, listOf, mapResult, optionalFieldOf, optionalFieldOf, optionalFieldOf, optionalFieldOf, orElse, orElse, orElse, orElseGet, orElseGet, orElseGet, partialDispatch, promotePartial, sizeLimitedListOf, stable, validate, withAlternative, withAlternative, withLifecycle, xmapMethods inherited from interface Decoder
boxed, decode, flatMap, map, parse, parse, simple, terminalMethods inherited from interface Encoder
comap, encodeStart, flatComap
-
Field Details
-
codec
-
-
Constructor Details
-
MapCodecCodec
-
-
Method Details
-
decode
-
encode
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
codec
-