Record Class UnboundMapStreamCodec<B extends io.netty.buffer.ByteBuf, K, V>
java.lang.Object
java.lang.Record
dev.latvian.mods.klib.codec.UnboundMapStreamCodec<B,K,V>
- All Implemented Interfaces:
KLibStreamCodec<B,Map<K, V>>, net.minecraft.network.codec.StreamCodec<B, Map<K, V>>, net.minecraft.network.codec.StreamDecoder<B, Map<K, V>>, net.minecraft.network.codec.StreamEncoder<B, Map<K, V>>
public record UnboundMapStreamCodec<B extends io.netty.buffer.ByteBuf, K, V>(net.minecraft.network.codec.StreamCodec<? super B extends io.netty.buffer.ByteBuf, K> keyCodec, net.minecraft.network.codec.StreamCodec<? super B extends io.netty.buffer.ByteBuf, V> valueCodec, boolean ordered, boolean identity)
extends Record
implements net.minecraft.network.codec.StreamCodec<B,Map<K,V>>
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.network.codec.StreamCodec
net.minecraft.network.codec.StreamCodec.CodecOperation<B,S, T> -
Constructor Summary
ConstructorsConstructorDescriptionUnboundMapStreamCodec(net.minecraft.network.codec.StreamCodec<? super B, K> keyCodec, net.minecraft.network.codec.StreamCodec<? super B, V> valueCodec, boolean ordered, boolean identity) Creates an instance of aUnboundMapStreamCodecrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanidentity()Returns the value of theidentityrecord component.keyCodec()Returns the value of thekeyCodecrecord component.booleanordered()Returns the value of theorderedrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thevalueCodecrecord component.Methods inherited from interface net.minecraft.network.codec.StreamCodec
apply, cast, dispatch, map, mapStream
-
Constructor Details
-
UnboundMapStreamCodec
public UnboundMapStreamCodec(net.minecraft.network.codec.StreamCodec<? super B, K> keyCodec, net.minecraft.network.codec.StreamCodec<? super B, V> valueCodec, boolean ordered, boolean identity) Creates an instance of aUnboundMapStreamCodecrecord class.- Parameters:
keyCodec- the value for thekeyCodecrecord componentvalueCodec- the value for thevalueCodecrecord componentordered- the value for theorderedrecord componentidentity- the value for theidentityrecord component
-
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
keyCodec
-
valueCodec
-
ordered
public boolean ordered()Returns the value of theorderedrecord component.- Returns:
- the value of the
orderedrecord component
-
identity
public boolean identity()Returns the value of theidentityrecord component.- Returns:
- the value of the
identityrecord component
-