org.apache.commons.configuration
Class PropertiesConfigurationLayout.PropertyLayoutData

java.lang.Object
  extended by org.apache.commons.configuration.PropertiesConfigurationLayout.PropertyLayoutData
All Implemented Interfaces:
java.lang.Cloneable
Enclosing class:
PropertiesConfigurationLayout

static class PropertiesConfigurationLayout.PropertyLayoutData
extends java.lang.Object
implements java.lang.Cloneable

A helper class for storing all layout related information for a configuration property.


Field Summary
private  int blancLines
          Stores the number of blanc lines before this property.
private  java.lang.StringBuffer comment
          Stores the comment for the property.
private  boolean singleLine
          Stores the single line property.
 
Constructor Summary
PropertiesConfigurationLayout.PropertyLayoutData()
          Creates a new instance of PropertyLayoutData.
 
Method Summary
 void addComment(java.lang.String s)
          Adds a comment for this property.
 java.lang.Object clone()
          Creates a copy of this object.
 int getBlancLines()
          Returns the number of blanc lines before this property.
 java.lang.String getComment()
          Returns the comment for this property.
 boolean isSingleLine()
          Returns the single line flag.
 void setBlancLines(int blancLines)
          Sets the number of properties before this property.
 void setComment(java.lang.String s)
          Sets the comment for this property.
 void setSingleLine(boolean singleLine)
          Sets the single line flag.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

comment

private java.lang.StringBuffer comment
Stores the comment for the property.


blancLines

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


singleLine

private boolean singleLine
Stores the single line property.

Constructor Detail

PropertiesConfigurationLayout.PropertyLayoutData

public PropertiesConfigurationLayout.PropertyLayoutData()
Creates a new instance of PropertyLayoutData.

Method Detail

getBlancLines

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

Returns:
the number of blanc lines before this property

setBlancLines

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

Parameters:
blancLines - the number of properties before this property

isSingleLine

public boolean isSingleLine()
Returns the single line flag.

Returns:
the single line flag

setSingleLine

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

Parameters:
singleLine - the single line flag

addComment

public void addComment(java.lang.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

setComment

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

Parameters:
s - the new comment (can be null)

getComment

public java.lang.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)

clone

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

Overrides:
clone in class java.lang.Object
Returns:
the copy