public class TypedMapCodec<K,V> extends java.lang.Object implements MapCodec<V>
| Constructor | 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 | 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, unitpublic <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>