Class AbstractMutableConfig

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

@API(status=INTERNAL, since="1.0") public abstract class AbstractMutableConfig extends AbstractConfig implements MutableConfig
Base abstract implementation of mutable configuration properties provider.
Since:
1.0
Version:
1.0, 2025-04
Author:
(w) Iker Hernaez
  • Constructor Details

    • AbstractMutableConfig

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

    • getEncoder

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

      public void set(@NotBlank @NotBlank String key, String value)
      Sets the value of the specified configuration property.
      Specified by:
      set in interface MutableConfig
      Parameters:
      key - The configuration property.
      value - The value to set
    • setInt

      protected abstract void setInt(@NotBlank @NotBlank String key, @NotNull @NotNull 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

      public void remove(@NotBlank @NotBlank String... keys)
      Removes the specified configuration properties.
      Specified by:
      remove in interface MutableConfig
      Parameters:
      keys - The configuration properties.
    • removeInt

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