Class 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

      Fields 
      Modifier and Type Field Description
      private int blankLines
      Stores the number of blank lines before this property.
      private java.lang.StringBuffer comment
      Stores the comment for the property.
      private java.lang.String separator
      The separator to be used for this property.
      private boolean singleLine
      Stores the single line property.
    • Constructor Summary

      Constructors 
      Constructor Description
      PropertyLayoutData()
      Creates a new instance of PropertyLayoutData.
    • Field Detail

      • comment

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

        private java.lang.String separator
        The separator to be used for this property.
      • blankLines

        private int blankLines
        Stores the number of blank lines before this 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​(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
      • getBlancLines

        @Deprecated
        public int getBlancLines()
        Deprecated.
        Use {#link getBlankLines()}.
        Gets the number of blank lines before this property.
        Returns:
        the number of blank lines before this property
      • getBlankLines

        public int getBlankLines()
        Gets the number of blank lines before this property.
        Returns:
        the number of blank lines before this property
        Since:
        2.8.0
      • getComment

        public java.lang.String getComment()
        Gets the comment for this property. The comment is returned as it is, without processing of comment characters.
        Returns:
        the comment (can be null)
      • getSeparator

        public java.lang.String getSeparator()
        Gets the separator that was used for this property.
        Returns:
        the property separator
      • isSingleLine

        public boolean isSingleLine()
        Returns the single line flag.
        Returns:
        the single line flag
      • setBlancLines

        @Deprecated
        public void setBlancLines​(int blankLines)
        Deprecated.
        Sets the number of properties before this property.
        Parameters:
        blankLines - the number of properties before this property
      • setBlankLines

        public void setBlankLines​(int blankLines)
        Sets the number of properties before this property.
        Parameters:
        blankLines - the number of properties before this property
        Since:
        2.8.0
      • setComment

        public void setComment​(java.lang.String s)
        Sets the comment for this property.
        Parameters:
        s - the new comment (can be null)
      • setSeparator

        public void setSeparator​(java.lang.String separator)
        Sets the separator to be used for the represented property.
        Parameters:
        separator - the property separator
      • setSingleLine

        public void setSingleLine​(boolean singleLine)
        Sets the single line flag.
        Parameters:
        singleLine - the single line flag