public class TypedMapCodec<K,V> extends java.lang.Object implements MapCodec<V>
| Constructor and Description |
|---|
TypedMapCodec(java.lang.String typeKey,
Codec<K> keyCodec,
java.util.function.Function<V,K> typeMapper,
java.util.function.Function<K,MapCodec<? extends V>> continuation) |
| Modifier and Type | Method and Description |
|---|---|
<S> Result<V> |
deserialize(DataConverter<S> converter,
java.util.Map<S,S> map) |
<S> Result<java.util.Map<S,S>> |
serialize(DataConverter<S> converter,
java.util.Map<S,S> map,
V element) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitasCodec, defaulted, defaulted, either, elseGet, failing, field, lazyInit, map, mapThrowing, optionalKey, optionalLenientKey, recursive, requiredKey, unit, verifiedpublic <S> Result<java.util.Map<S,S>> serialize(DataConverter<S> converter, java.util.Map<S,S> map, V element)
serialize in interface MapSerializer<V>public <S> Result<V> deserialize(DataConverter<S> converter, java.util.Map<S,S> map)
deserialize in interface MapDeserializer<V>