|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.Dictionary<K,V>
java.util.Hashtable<java.lang.Object,java.lang.Object>
java.util.Properties
org.pf.util.OrderedProperties
org.pf.file.PropertiesFileContent
public class PropertiesFileContent
Represents a properties collection with empty lines and comments. The order will be preserved.
| Constructor Summary | |
|---|---|
PropertiesFileContent()
Initialize the new instance with default values. |
|
PropertiesFileContent(int initialCapacity)
Initialize the new instance with an initial capacity. |
|
| Method Summary | |
|---|---|
void |
addLine(java.lang.String line)
Adds the given line at the end of all contained elements |
boolean |
addProperty(java.lang.String name,
java.lang.String value)
Adds the property with the specified name and value. |
boolean |
commentProperty(java.lang.String name)
Turns the property specified by the given name to a comment. |
boolean |
modifyProperty(java.lang.String name,
java.lang.String newValue)
Modifies the value of the property specified by the given name. |
java.lang.Object |
setProperty(java.lang.String name,
java.lang.String value)
Modifies the value or adds the property specified by the given name. |
boolean |
uncommentProperty(java.lang.String name)
Changes a comment containing the property specified by the given name to a real property setting, by removing the leading comment indicator '#'. |
| Methods inherited from class org.pf.util.OrderedProperties |
|---|
clear, deleteProperty, entrySet, getProperty, getProperty, getPropertyNames, keys, keySet, list, list, load, propertyNames, remove, save, size, store |
| Methods inherited from class java.util.Properties |
|---|
loadFromXML, storeToXML, storeToXML |
| Methods inherited from class java.util.Hashtable |
|---|
clone, contains, containsKey, containsValue, elements, equals, get, hashCode, isEmpty, put, putAll, toString, values |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PropertiesFileContent()
public PropertiesFileContent(int initialCapacity)
| Method Detail |
|---|
public void addLine(java.lang.String line)
public java.lang.Object setProperty(java.lang.String name,
java.lang.String value)
setProperty in class OrderedPropertiesname - The name of the property to setvalue - The new value to be set
public boolean modifyProperty(java.lang.String name,
java.lang.String newValue)
name - The name of the property to modifynewValue - The new value to be set
public boolean addProperty(java.lang.String name,
java.lang.String value)
name - The name of the property to addvalue - The value to be setpublic boolean commentProperty(java.lang.String name)
name - The name of the property to change to be a commentpublic boolean uncommentProperty(java.lang.String name)
name - The name of the property to change from a comment to a property
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||