Package sonia.scm.io

Class INISection

java.lang.Object
sonia.scm.io.INISection

public class INISection extends Object
A section of INIConfiguration. The section consists of keys and values.
  • Constructor Details

    • INISection

      public INISection(String name)
      Constructs a new empty section with the given name.
      Parameters:
      name - name of the section
    • INISection

      public INISection(String name, Map<String,String> initialParameters)
      Constructs a new section with the given name and parameters.
      Parameters:
      name - name of the section
      initialParameters - initial parameter
  • Method Details

    • getName

      public String getName()
      Returns the name of the section.
    • getParameter

      public String getParameter(String key)
      Returns the value of the parameter with the given key or null if the given parameter does not exist.
    • getParameterKeys

      public Collection<String> getParameterKeys()
      Returns all parameter keys of the section.
    • setParameter

      public void setParameter(String key, String value)
      Sets the parameter with the given key to the given value.
    • removeParameter

      public void removeParameter(String key)
      Remove parameter with the given name from the section.
    • toString

      public String toString()
      Overrides:
      toString in class Object