cz.cuni.mff.mirovsky.properties
Class Properties
java.lang.Object
cz.cuni.mff.mirovsky.properties.Properties
- All Implemented Interfaces:
- ItemSet
public class Properties
- extends java.lang.Object
- implements ItemSet
Class Properties keeps a set of properties sections, stored together e.g. in one file.
Method Summary |
boolean |
getBooleanProperty(java.lang.String section,
java.lang.String name,
boolean default_value)
|
Properties |
getClone()
|
java.lang.String |
getComment()
|
java.lang.String |
getDefaultSectionName()
|
int |
getIntProperty(java.lang.String section,
java.lang.String name,
int default_value)
|
java.lang.String |
getItemComment(java.lang.String item_name)
|
java.lang.String |
getItemValue(java.lang.String item_name)
|
java.util.Iterator |
getIteratorOverNames()
|
java.util.Iterator |
getIteratorOverValues()
|
long |
getLongProperty(java.lang.String section,
java.lang.String name,
long default_value)
|
Property |
getProperty(java.lang.String section_name,
java.lang.String property_name)
|
PropertiesSection |
getSection(java.lang.String section_name)
|
java.lang.String |
getStringProperty(java.lang.String section,
java.lang.String name,
java.lang.String default_value)
|
static void |
mergeSections(PropertiesSection target,
PropertiesSection addition)
|
void |
putSection(PropertiesSection section)
|
void |
removeItem(java.lang.String item_name)
|
void |
removeProperty(Property property)
|
void |
removeProperty(java.lang.String p_section_name,
java.lang.String property_name)
|
void |
removeSection(java.lang.String section_name)
|
void |
setComment(java.lang.String p_comment)
|
void |
setDefaultSectionName(java.lang.String p_name)
|
void |
setProperty(Property property)
|
void |
setPropertyValue(java.lang.String section_name,
java.lang.String property_name,
java.lang.String property_value)
|
void |
updateProperty(java.lang.String section_name,
java.lang.String property_name,
java.lang.String value,
java.lang.String default_comment)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Properties
public Properties()
Properties
public Properties(java.lang.String p_comment)
getClone
public Properties getClone()
getProperty
public Property getProperty(java.lang.String section_name,
java.lang.String property_name)
getIntProperty
public int getIntProperty(java.lang.String section,
java.lang.String name,
int default_value)
getLongProperty
public long getLongProperty(java.lang.String section,
java.lang.String name,
long default_value)
getBooleanProperty
public boolean getBooleanProperty(java.lang.String section,
java.lang.String name,
boolean default_value)
getStringProperty
public java.lang.String getStringProperty(java.lang.String section,
java.lang.String name,
java.lang.String default_value)
setProperty
public void setProperty(Property property)
setPropertyValue
public void setPropertyValue(java.lang.String section_name,
java.lang.String property_name,
java.lang.String property_value)
updateProperty
public void updateProperty(java.lang.String section_name,
java.lang.String property_name,
java.lang.String value,
java.lang.String default_comment)
removeProperty
public void removeProperty(Property property)
removeProperty
public void removeProperty(java.lang.String p_section_name,
java.lang.String property_name)
getSection
public PropertiesSection getSection(java.lang.String section_name)
putSection
public void putSection(PropertiesSection section)
mergeSections
public static void mergeSections(PropertiesSection target,
PropertiesSection addition)
getIteratorOverNames
public java.util.Iterator getIteratorOverNames()
- Specified by:
getIteratorOverNames
in interface ItemSet
getIteratorOverValues
public java.util.Iterator getIteratorOverValues()
- Specified by:
getIteratorOverValues
in interface ItemSet
getDefaultSectionName
public java.lang.String getDefaultSectionName()
setDefaultSectionName
public void setDefaultSectionName(java.lang.String p_name)
getComment
public java.lang.String getComment()
setComment
public void setComment(java.lang.String p_comment)
removeSection
public void removeSection(java.lang.String section_name)
getItemValue
public java.lang.String getItemValue(java.lang.String item_name)
- Specified by:
getItemValue
in interface ItemSet
getItemComment
public java.lang.String getItemComment(java.lang.String item_name)
- Specified by:
getItemComment
in interface ItemSet
removeItem
public void removeItem(java.lang.String item_name)
- Specified by:
removeItem
in interface ItemSet