Class AbstractMutableConfig

java.lang.Object
dev.orne.config.impl.AbstractConfig
dev.orne.config.impl.AbstractMutableConfig
All Implemented Interfaces:
Config
Direct Known Subclasses:
AbstractWatchableConfig

@API(status=INTERNAL, since="1.0") public abstract class AbstractMutableConfig extends AbstractConfig
Base abstract implementation of mutable configuration properties provider.

Extending classes must add MutableConfig interface and override set and remove methods making them public and delegating to the protected methods of this class.

Since:
1.0
Version:
1.0, 2025-04
Author:
(w) Iker Hernaez
  • Constructor Details

    • AbstractMutableConfig

      protected AbstractMutableConfig(ConfigOptions options)
      Creates a new instance.
      Parameters:
      options - The configuration builder options.
    • AbstractMutableConfig

      protected AbstractMutableConfig(ConfigOptions options, MutableConfigOptions mutableOptions)
      Creates a new instance.
      Parameters:
      options - The configuration builder options.
      mutableOptions - The mutable configuration builder options.
  • Method Details

    • getEncoder

      protected ValueEncoder getEncoder()
      Returns the configuration properties values encoder.
      Returns:
      The configuration properties values encoder.
    • set

      protected void set(String key, @Nullable String value)
      Sets the value of the specified configuration property.
      Parameters:
      key - The configuration property.
      value - The value to set
      Throws:
      ConfigException - If an error occurs setting the configuration property value
      See Also:
    • setInt

      protected void setInt(String key, String value)
      Sets the value of the specified configuration property.
      Parameters:
      key - The configuration property.
      value - The value to set
      Throws:
      ConfigException - If an error occurs setting the configuration property value
    • remove

      protected void remove(String... keys)
      Removes the specified configuration properties.
      Parameters:
      keys - The configuration properties.
      Throws:
      ConfigException - If an error occurs removing the configuration properties.
      See Also:
    • removeInt

      protected void removeInt(String... keys)
      Removes the specified configuration properties.
      Parameters:
      keys - The configuration properties.
      Throws:
      ConfigException - If an error occurs removing the configuration properties.