net.sf.antcontrib.inifile

Class IniSection

public class IniSection extends Object implements IniPart

A section within an IniFile.

Author: Matthew Inger

Constructor Summary
IniSection()
Default contructor, constructs an IniSectino with no name
IniSection(String name)
Constructs an IniSection with the given name
Method Summary
StringgetName()
Gets the name of the section
ListgetProperties()
Gets a list of all properties in this section
IniPropertygetProperty(String name)
Gets the property with the given name
voidremoveProperty(String name)
Removes a property from this ection
voidsetName(String name)
Sets the name of the section
voidsetProperty(IniProperty property)
Sets a property, replacing the old value, if necessary.
voidwrite(Writer writer)

Constructor Detail

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 Detail

getName

public String getName()
Gets the name of the section

getProperties

public List getProperties()
Gets a list of all properties in this section

Returns: A List of IniProperty objects

getProperty

public IniProperty getProperty(String name)
Gets the property with the given name

Parameters: name The name of the property

removeProperty

public void removeProperty(String name)
Removes a property from this ection

Parameters: name The name of the property to remove

setName

public void setName(String name)
Sets the name of the section

Parameters: name The name of the section

setProperty

public void setProperty(IniProperty property)
Sets a property, replacing the old value, if necessary.

Parameters: property The property to set

write

public void write(Writer writer)