Interface ImmutableConfig

All Known Implementing Classes:
ScriptConfig

public sealed interface ImmutableConfig permits ScriptConfig
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Checks if the properties map contains the specified key.
    Gets a value from the properties by a name
    void
    Saves the configuration to a file.
  • Method Details

    • containsKey

      boolean containsKey(String key)
      Checks if the properties map contains the specified key.
      Parameters:
      key - The key to check for
      Returns:
      true if the key is present in the map, false otherwise
    • getProperty

      String getProperty(String name)
      Gets a value from the properties by a name
      Parameters:
      name - The name of the property
      Example:
                                           
                                            ScriptConfiguration config = ...;
                                            String myValue = config.getProperty("my_property");
                                            System.out.println(myValue);
                                           
                                           
    • save

      void save() throws IOException
      Saves the configuration to a file.
      Throws:
      IOException - if an I/O error occurs while saving the configuration