Package me.a8kj.config.builder
Class PairedConfigBuilder<K>
java.lang.Object
me.a8kj.config.builder.PairedConfigBuilder<K>
- Type Parameters:
K- the type of keys used in the paired data memory.
A specialized builder class for creating
ConfigFile instances that utilize PairedDataMemory.
This builder is designed for configurations that require a key-value mapping structure in memory.- Since:
- 0.1
- Author:
- a8kj7sea
-
Method Summary
Modifier and TypeMethodDescriptionat(PathProvider pathProvider) Sets the path provider used to determine the storage location of the configuration file.build()Validates all required components and creates a newConfigFileinstance.memory(PairedDataMemory<K> memory) Sets the paired data memory implementation for managing key-value configuration data.meta(ConfigMeta meta) Sets the metadata for the configuration, containing identifying information and paths.static <T> PairedConfigBuilder<T> Static factory method to initiate the paired builder with a specific key type.
-
Method Details
-
of
Static factory method to initiate the paired builder with a specific key type.- Type Parameters:
T- the type of keys for the new builder.- Parameters:
keyType- the class representing the key type.- Returns:
- a new instance of
PairedConfigBuilder. - Since:
- 0.1
-
meta
Sets the metadata for the configuration, containing identifying information and paths.- Parameters:
meta- theConfigMetainstance.- Returns:
- the current builder instance for chaining.
- Since:
- 0.1
-
at
Sets the path provider used to determine the storage location of the configuration file.- Parameters:
pathProvider- thePathProviderinstance.- Returns:
- the current builder instance for chaining.
- Since:
- 0.1
-
memory
Sets the paired data memory implementation for managing key-value configuration data.- Parameters:
memory- thePairedDataMemoryinstance.- Returns:
- the current builder instance for chaining.
- Since:
- 0.1
-
build
Validates all required components and creates a newConfigFileinstance.- Returns:
- a fully initialized
ConfigFileusing paired memory. - Throws:
NullPointerException- if meta, memory, or pathProvider are not initialized.- Since:
- 0.1
-