org.apache.commons.configuration

Class PropertiesConfigurationLayout.PropertyLayoutData

static class PropertiesConfigurationLayout.PropertyLayoutData extends Object implements Cloneable

A helper class for storing all layout related information for a configuration property.
Field Summary
intblancLines
Stores the number of blanc lines before this property.
StringBuffercomment
Stores the comment for the property.
booleansingleLine
Stores the single line property.
Constructor Summary
PropertyLayoutData()
Creates a new instance of PropertyLayoutData.
Method Summary
voidaddComment(String s)
Adds a comment for this property.
Objectclone()
Creates a copy of this object.
intgetBlancLines()
Returns the number of blanc lines before this property.
StringgetComment()
Returns the comment for this property.
booleanisSingleLine()
Returns the single line flag.
voidsetBlancLines(int blancLines)
Sets the number of properties before this property.
voidsetComment(String s)
Sets the comment for this property.
voidsetSingleLine(boolean singleLine)
Sets the single line flag.

Field Detail

blancLines

private int blancLines
Stores the number of blanc lines before this property.

comment

private StringBuffer comment
Stores the comment for the property.

singleLine

private boolean singleLine
Stores the single line property.

Constructor Detail

PropertyLayoutData

public PropertyLayoutData()
Creates a new instance of PropertyLayoutData.

Method Detail

addComment

public void addComment(String s)
Adds a comment for this property. If already a comment exists, the new comment is added (separated by a newline).

Parameters: s the comment to add

clone

public Object clone()
Creates a copy of this object.

Returns: the copy

getBlancLines

public int getBlancLines()
Returns the number of blanc lines before this property.

Returns: the number of blanc lines before this property

getComment

public String getComment()
Returns the comment for this property. The comment is returned as it is, without processing of comment characters.

Returns: the comment (can be null)

isSingleLine

public boolean isSingleLine()
Returns the single line flag.

Returns: the single line flag

setBlancLines

public void setBlancLines(int blancLines)
Sets the number of properties before this property.

Parameters: blancLines the number of properties before this property

setComment

public void setComment(String s)
Sets the comment for this property.

Parameters: s the new comment (can be null)

setSingleLine

public void setSingleLine(boolean singleLine)
Sets the single line flag.

Parameters: singleLine the single line flag