T - The type of the configP - The type of the parent configpublic class SubConfigSerializer<T extends ISubConfig<T,P>,P extends IConfig<P>> extends java.lang.Object implements ConfigSerializer<T>
| Constructor and Description |
|---|
SubConfigSerializer(ConfigManager<P> parentManager,
java.util.function.Function<P,T> getter)
Creates a sub-config serializer
|
| Modifier and Type | Method and Description |
|---|---|
T |
deserialize()
Deserializes the config.
|
void |
serialize(T config)
Serializes the config.
|
public SubConfigSerializer(ConfigManager<P> parentManager, java.util.function.Function<P,T> getter)
parentManager - The manager of the parent configgetter - The function used to get the sub-config from the parentpublic T deserialize()
ConfigSerializerdeserialize in interface ConfigSerializer<T extends ISubConfig<T,P>>public void serialize(T config)
ConfigSerializerserialize in interface ConfigSerializer<T extends ISubConfig<T,P>>config - The config to be serialized.