public final class FieldDecoder<A> extends MapDecoder.Implementation<A>
MapDecoder.Implementation<A>| Constructor and Description |
|---|
FieldDecoder(String name,
Decoder<A> elementCodec) |
| Modifier and Type | Method and Description |
|---|---|
<T> DataResult<A> |
decode(DynamicOps<T> ops,
MapLike<T> input)
Decodes an object from the given map of serialized entries.
|
boolean |
equals(Object o) |
int |
hashCode() |
<T> Stream<T> |
keys(DynamicOps<T> ops)
Returns the set of keys this object defines or accepts, serialized to the provided form.
|
String |
toString() |
compressorclone, finalize, getClass, notify, notifyAll, wait, wait, waitap, compressedDecode, compressor, decoder, flatMap, map, withLifecycleforStringsprotected final String name
public <T> DataResult<A> decode(DynamicOps<T> ops, MapLike<T> input)
MapDecoderDataResult.T - The type of the serialized form.ops - The DynamicOps instance defining the serialized form.input - A map or maplike object containing the serialized entries.DataResult containing the decoded object, or an error if no object could be decoded.MapDecoder.compressedDecode(DynamicOps, Object)public <T> Stream<T> keys(DynamicOps<T> ops)
KeyableT - The type of the serialized form.ops - The DynamicOps instance defining the serialized form.