2
* Copyright (c) 2001-2004 Ant-Contrib project. All rights reserved.
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
8
* http://www.apache.org/licenses/LICENSE-2.0
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
16
package net.sf.antcontrib.inifile;
18
import java.io.IOException;
19
import java.io.Writer;
22
/****************************************************************************
23
* A single property in an IniSection.
25
* @author <a href='mailto:mattinger@yahoo.com'>Matthew Inger</a>
27
****************************************************************************/
30
public class IniProperty
45
* Construct an IniProperty with a certain name and value
46
* @param name The name of the property
47
* @param value The property value
49
public IniProperty(String name, String value)
57
* Gets the name of the property
59
public String getName()
65
* Sets the name of the property
66
* @param name The name of the property
68
public void setName(String name)
75
* Gets the value of the property
77
public String getValue()
84
* Sets the value of the property
85
* @param value the value of the property
87
public void setValue(String value)
94
* Write this property to a writer object.
98
public void write(Writer writer)
102
if (! name.trim().startsWith(";"))
103
writer.write("=" + value);