/** * Returns the number of blanc lines before this property key. If this key * does not exist, 0 will be returned. * * @param key the property key * @return the number of blanc lines before the property definition for this * key */ public int getBlancLinesBefore(final String key) { return fetchLayoutData(key).getBlancLines(); }
/** * Sets the number of blanc lines before the given property key. This can be * used for a logical grouping of properties. * * @param key the property key * @param number the number of blanc lines to add before this property * definition */ public void setBlancLinesBefore(final String key, final int number) { fetchLayoutData(key).setBlancLines(number); }
/** * Returns a flag whether the specified property is defined on a single * line. This is meaningful only if this property has multiple values. * * @param key the property key * @return a flag if this property is defined on a single line */ public boolean isSingleLine(final String key) { return fetchLayoutData(key).isSingleLine(); }
/** * Returns the separator for the property with the given key. * * @param key the property key * @return the property separator for this property * @since 1.7 */ public String getSeparator(final String key) { return fetchLayoutData(key).getSeparator(); }
/** * Sets the comment for the specified property key. The comment (or its * single lines if it is a multi-line comment) can start with a comment * character. If this is the case, it will be written without changes. * Otherwise a default comment character is added automatically. * * @param key the key of the property * @param comment the comment for this key (can be <b>null</b>, then the * comment will be removed) */ public void setComment(final String key, final String comment) { fetchLayoutData(key).setComment(comment); }
/** * Returns the comment for the specified property key. The comment is * returned as it was set (either manually by calling * {@code setComment()} or when it was loaded from a properties * file). No modifications are performed. * * @param key the key of the property * @return the comment for this key (can be <b>null</b>) */ public String getComment(final String key) { return fetchLayoutData(key).getComment(); }
/** * Sets the "single line flag" for the specified property key. * This flag is evaluated if the property has multiple values (i.e. if it is * a list property). In this case, if the flag is set, all values will be * written in a single property definition using the list delimiter as * separator. Otherwise multiple lines will be written for this property, * each line containing one property value. * * @param key the property key * @param f the single line flag */ public void setSingleLine(final String key, final boolean f) { fetchLayoutData(key).setSingleLine(f); }
/** * Sets the separator to be used for the property with the given key. The * separator is the string between the property key and its value. For new * properties " = " is used. When a properties file is read, the * layout tries to determine the separator for each property. With this * method the separator can be changed. To be compatible with the properties * format only the characters {@code =} and {@code :} (with or * without whitespace) should be used, but this method does not enforce this * - it accepts arbitrary strings. If the key refers to a property with * multiple values that are written on multiple lines, this separator will * be used on all lines. * * @param key the key for the property * @param sep the separator to be used for this property * @since 1.7 */ public void setSeparator(final String key, final String sep) { fetchLayoutData(key).setSeparator(sep); }
layoutData.containsKey(event.getPropertyName()); final PropertyLayoutData data = fetchLayoutData(event.getPropertyName()); data.setSingleLine(!contained); .getEventType())) fetchLayoutData(event.getPropertyName());
final PropertyLayoutData data = fetchLayoutData(reader .getPropertyName()); if (contained)