Package net.sf.antcontrib.inifile
Class IniSection
- java.lang.Object
-
- net.sf.antcontrib.inifile.IniSection
-
- All Implemented Interfaces:
IniPart
public class IniSection extends java.lang.Object implements IniPart
A section within an IniFile.- Author:
- Matthew Inger
-
-
Constructor Summary
Constructors Constructor Description IniSection()
Default contructor, constructs an IniSectino with no nameIniSection(java.lang.String name)
Constructs an IniSection with the given name
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getName()
Gets the name of the sectionjava.util.List
getProperties()
Gets a list of all properties in this sectionIniProperty
getProperty(java.lang.String name)
Gets the property with the given namevoid
removeProperty(java.lang.String name)
Removes a property from this ectionvoid
setName(java.lang.String name)
Sets the name of the sectionvoid
setProperty(IniProperty property)
Sets a property, replacing the old value, if necessary.void
write(java.io.Writer writer)
Write this part of the IniFile to a writer
-
-
-
Method Detail
-
getProperties
public java.util.List getProperties()
Gets a list of all properties in this section- Returns:
- A List of IniProperty objects
-
getName
public java.lang.String getName()
Gets the name of the section
-
setName
public void setName(java.lang.String name)
Sets the name of the section- Parameters:
name
- The name of the section
-
getProperty
public IniProperty getProperty(java.lang.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(java.lang.String name)
Removes a property from this ection- Parameters:
name
- The name of the property to remove
-
-