Package net.sf.antcontrib.inifile
Class IniSection
java.lang.Object
net.sf.antcontrib.inifile.IniSection
- All Implemented Interfaces:
IniPart
A section within an IniFile.
- Author:
- Matthew Inger
-
Constructor Summary
ConstructorsConstructorDescriptionDefault contructor, constructs an IniSectino with no nameIniSection
(String name) Constructs an IniSection with the given name -
Method Summary
Modifier and TypeMethodDescriptiongetName()
Gets the name of the sectionGets a list of all properties in this sectiongetProperty
(String name) Gets the property with the given namevoid
removeProperty
(String name) Removes a property from this ectionvoid
Sets the name of the sectionvoid
setProperty
(IniProperty property) Sets a property, replacing the old value, if necessary.void
Write this part of the IniFile to a writer
-
Constructor Details
-
IniSection
public IniSection()Default contructor, constructs an IniSectino with no name -
IniSection
Constructs an IniSection with the given name- Parameters:
name
- The name of the section
-
-
Method Details
-
getProperties
Gets a list of all properties in this section- Returns:
- A List of IniProperty objects
-
getName
Gets the name of the section -
setName
Sets the name of the section- Parameters:
name
- The name of the section
-
getProperty
Gets the property with the given name- Parameters:
name
- The name of the property
-
setProperty
Sets a property, replacing the old value, if necessary.- Parameters:
property
- The property to set
-
removeProperty
Removes a property from this ection- Parameters:
name
- The name of the property to remove
-
write
Description copied from interface:IniPart
Write this part of the IniFile to a writer- Specified by:
write
in interfaceIniPart
- Parameters:
writer
- The writer to write to- Throws:
IOException
-