Package me.a8kj.config.builder
Class StringConfigBuilder
java.lang.Object
me.a8kj.config.builder.StringConfigBuilder
A simplified builder class specifically designed for configurations that use
String keys.
This builder pre-initializes with StringMapPairedDataMemory to streamline the creation process.- Since:
- 0.1
- Author:
- a8kj7sea
-
Method Summary
Modifier and TypeMethodDescriptionat(PathProvider pathProvider) Sets the provider responsible for resolving the configuration's file path.build()Constructs the finalConfigFilewith a guaranteed string-based memory.static StringConfigBuildercreate()Static factory method to create a new instance of the string-based config builder.memory(StringMapPairedDataMemory memory) Allows overriding the default string memory implementation.meta(ConfigMeta meta) Sets the configuration metadata including the name and path logic.
-
Method Details
-
create
Static factory method to create a new instance of the string-based config builder.- Returns:
- a new
StringConfigBuilderinstance. - Since:
- 0.1
-
meta
Sets the configuration metadata including the name and path logic.- Parameters:
meta- theConfigMetainstance.- Returns:
- the current builder instance for chaining.
- Since:
- 0.1
-
at
Sets the provider responsible for resolving the configuration's file path.- Parameters:
pathProvider- thePathProviderinstance.- Returns:
- the current builder instance for chaining.
- Since:
- 0.1
-
memory
Allows overriding the default string memory implementation.- Parameters:
memory- a customStringMapPairedDataMemoryinstance.- Returns:
- the current builder instance for chaining.
- Since:
- 0.1
-
build
Constructs the finalConfigFilewith a guaranteed string-based memory.- Returns:
- a fully initialized
ConfigFilewith String keys. - Throws:
NullPointerException- if meta or pathProvider are null.- Since:
- 0.1
-