Class SubConfigSerializer<T extends ISubConfig<T,P>,P extends IConfig<P>>
java.lang.Object
net.uku3lig.ukulib.config.serialization.SubConfigSerializer<T,P>
- Type Parameters:
T- The type of the configP- The type of the parent config
- All Implemented Interfaces:
ConfigSerializer<T>
public class SubConfigSerializer<T extends ISubConfig<T,P>,P extends IConfig<P>>
extends Object
implements ConfigSerializer<T>
Manages the serialization of a sub-config, which is stored inside the main config file, under a table.
-
Constructor Summary
ConstructorsConstructorDescriptionSubConfigSerializer(ConfigManager<P> parentManager, Function<P, T> getter) Creates a sub-config serializer -
Method Summary
Modifier and TypeMethodDescriptionDeserializes the config.voidSerializes the config.
-
Constructor Details
-
SubConfigSerializer
Creates a sub-config serializer- Parameters:
parentManager- The manager of the parent configgetter- The function used to get the sub-config from the parent
-
-
Method Details
-
deserialize
Description copied from interface:ConfigSerializerDeserializes the config.- Specified by:
deserializein interfaceConfigSerializer<T extends ISubConfig<T,P>> - Returns:
- The deserialized config
-
serialize
Description copied from interface:ConfigSerializerSerializes the config.- Specified by:
serializein interfaceConfigSerializer<T extends ISubConfig<T,P>> - Parameters:
config- The config to be serialized.
-