Package net.minecraft.util
Record Class ExtraCodecs.StrictUnboundedMapCodec<K,V> 
java.lang.Object
java.lang.Record
net.minecraft.util.ExtraCodecs.StrictUnboundedMapCodec<K,V> 
- All Implemented Interfaces:
- com.mojang.serialization.Codec<Map<K,,- V>> - com.mojang.serialization.codecs.BaseMapCodec<K,,- V> - com.mojang.serialization.Decoder<Map<K,,- V>> - com.mojang.serialization.Encoder<Map<K,- V>> 
- Enclosing class:
- ExtraCodecs
- 
Nested Class SummaryNested classes/interfaces inherited from interface com.mojang.serialization.Codeccom.mojang.serialization.Codec.ResultFunction<A extends Object>
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final com.mojang.serialization.Codec<V>The field for theelementCodecrecord component.private final com.mojang.serialization.Codec<K>The field for thekeyCodecrecord component.Fields inherited from interface com.mojang.serialization.CodecBOOL, BYTE, BYTE_BUFFER, DOUBLE, EMPTY, FLOAT, INT, INT_STREAM, LONG, LONG_STREAM, PASSTHROUGH, SHORT, STRING
- 
Constructor SummaryConstructorsConstructorDescriptionStrictUnboundedMapCodec(com.mojang.serialization.Codec<K> keyCodec, com.mojang.serialization.Codec<V> elementCodec) Creates an instance of aStrictUnboundedMapCodecrecord class.
- 
Method SummaryModifier and TypeMethodDescriptiondecode(com.mojang.serialization.DynamicOps<T> p_298061_, com.mojang.serialization.MapLike<T> p_299914_) decode(com.mojang.serialization.DynamicOps<T> p_299262_, T p_297460_) com.mojang.serialization.Codec<V>Returns the value of theelementCodecrecord component.<T> com.mojang.serialization.DataResult<T>final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.com.mojang.serialization.Codec<K>keyCodec()Returns the value of thekeyCodecrecord component.toString()Returns a string representation of this record class.Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.mojang.serialization.codecs.BaseMapCodecencodeMethods inherited from interface com.mojang.serialization.CodeccomapFlatMap, deprecated, dispatch, dispatch, dispatchMap, dispatchMap, dispatchStable, fieldOf, flatComapMap, flatXmap, listOf, mapResult, optionalFieldOf, optionalFieldOf, optionalFieldOf, optionalFieldOf, orElse, orElse, orElse, orElseGet, orElseGet, orElseGet, partialDispatch, promotePartial, stable, withLifecycle, xmapMethods inherited from interface com.mojang.serialization.Decoderboxed, decode, flatMap, map, parse, parse, simple, terminalMethods inherited from interface com.mojang.serialization.Encodercomap, encodeStart, flatComap
- 
Field Details- 
keyCodecThe field for thekeyCodecrecord component.
- 
elementCodecThe field for theelementCodecrecord component.
 
- 
- 
Constructor Details- 
StrictUnboundedMapCodecpublic StrictUnboundedMapCodec(com.mojang.serialization.Codec<K> keyCodec, com.mojang.serialization.Codec<V> elementCodec) Creates an instance of aStrictUnboundedMapCodecrecord class.- Parameters:
- keyCodec- the value for the- keyCodecrecord component
- elementCodec- the value for the- elementCodecrecord component
 
 
- 
- 
Method Details- 
decode
- 
decodepublic <T> com.mojang.serialization.DataResult<com.mojang.datafixers.util.Pair<Map<K,V>, decodeT>> (com.mojang.serialization.DynamicOps<T> p_299262_, T p_297460_) - Specified by:
- decodein interface- com.mojang.serialization.Decoder<K>
 
- 
encodepublic <T> com.mojang.serialization.DataResult<T> encode(Map<K, V> p_301091_, com.mojang.serialization.DynamicOps<T> p_298442_, T p_300447_) - Specified by:
- encodein interface- com.mojang.serialization.Encoder<K>
 
- 
toStringReturns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
- 
keyCodecReturns the value of thekeyCodecrecord component.
- 
elementCodecReturns the value of theelementCodecrecord component.
- 
hashCodepublic final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
- 
equalsIndicates 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).
 
-