Class IniSection

java.lang.Object
net.sf.antcontrib.inifile.IniSection
All Implemented Interfaces:
IniPart

public class IniSection extends Object implements IniPart
A section within an IniFile.
Author:
Matthew Inger
  • Constructor Details

    • IniSection

      public IniSection()
      Default contructor, constructs an IniSectino with no name
    • IniSection

      public IniSection(String name)
      Constructs an IniSection with the given name
      Parameters:
      name - The name of the section
  • Method Details

    • getProperties

      public List getProperties()
      Gets a list of all properties in this section
      Returns:
      A List of IniProperty objects
    • getName

      public String getName()
      Gets the name of the section
    • setName

      public void setName(String name)
      Sets the name of the section
      Parameters:
      name - The name of the section
    • getProperty

      public IniProperty getProperty(String name)
      Gets the property with the given name
      Parameters:
      name - The name of the property
    • setProperty

      public void setProperty(IniProperty property)
      Sets a property, replacing the old value, if necessary.
      Parameters:
      property - The property to set
    • removeProperty

      public void removeProperty(String name)
      Removes a property from this ection
      Parameters:
      name - The name of the property to remove
    • write

      public void write(Writer writer) throws IOException
      Description copied from interface: IniPart
      Write this part of the IniFile to a writer
      Specified by:
      write in interface IniPart
      Parameters:
      writer - The writer to write to
      Throws:
      IOException