public class FieldEncoder<A> extends MapEncoder.Implementation<A>
MapEncoder.Implementation<A>
Constructor and Description |
---|
FieldEncoder(String name,
Encoder<A> elementCodec) |
Modifier and Type | Method and Description |
---|---|
<T> RecordBuilder<T> |
encode(A input,
DynamicOps<T> ops,
RecordBuilder<T> prefix)
Encodes the input into a set of record fields that are added to the given builder.
|
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
comap, compressedBuilder, compressor, encoder, flatComap, makeCompressedBuilder, withLifecycle
forStrings
public <T> RecordBuilder<T> encode(A input, DynamicOps<T> ops, RecordBuilder<T> prefix)
MapEncoder
T
- The type of the serialized form.input
- The value to serialize.ops
- The DynamicOps
instance defining the serialized form.prefix
- A RecordBuilder
to add the serialized fields to.public <T> Stream<T> keys(DynamicOps<T> ops)
Keyable
T
- The type of the serialized form.ops
- The DynamicOps
instance defining the serialized form.