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() |
compressor
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
ap, compressedDecode, compressor, decoder, flatMap, map, withLifecycle
forStrings
protected final String name
public <T> DataResult<A> decode(DynamicOps<T> ops, MapLike<T> input)
MapDecoder
DataResult
.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)
Keyable
T
- The type of the serialized form.ops
- The DynamicOps
instance defining the serialized form.