|
Arch4J 1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.arch4j.propertytree.Property
Constructor Summary | |
Property(String aName)
build a node in a property tree. |
|
Property(String aName,
String aValue)
build a node in a property tree. |
Method Summary | |
void |
addChild(Property aProperty)
add a property as a child of this property. |
Property |
getChild(String aName)
retrieve the first child property found with a given name name |
Property |
getChild(String aName,
String aValue)
retrieve a the first property with a given name and value. |
String[] |
getChildNames()
return a list of all of this property's children's names. |
Property[] |
getChildren()
retrieve the complete list of this property's children. |
Property[] |
getChildren(String aName)
retrieve a set of child property by name, leaving them in the list. |
String |
getChildValue(String aName)
retrieve the value of the first child property found with a given name |
String |
getChildValue(String aName,
String defaultValue)
retrieve the value of the first child property found with a given name, or return a default value if no property is found. |
int |
getChildValueAsInt(String aName)
retrieve the value of the first child property found with a given name and convert it to an integer |
int |
getChildValueAsInt(String aName,
int defaultValue)
retrieve the value of the first child property found with a given name and convert it to an integer, or return a default value if no property is found. |
String[] |
getChildValues(String aName)
retrive values of all child propeties with a given name. |
String |
getName()
|
ReadOnlyProperty |
getReadOnlyChild(String aName)
retrieve the first child property found with a given name. |
ReadOnlyProperty |
getReadOnlyChild(String aName,
String aValue)
retrieve a read only version of the first property with a given name and value. |
ReadOnlyProperty[] |
getReadOnlyChildren()
retrieve the complete read-only list of this property's children. |
ReadOnlyProperty[] |
getReadOnlyChildren(String aName)
retrieve a read only set of child property by name, leaving them in the list. |
String |
getValue()
|
void |
setValue(String newValue)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Property(String aName)
aName
- name or key for this property. Example "QueueSize".public Property(String aName, String aValue)
aName
- name or key for this property. Example "QueueSize".aValue
- value of this property represented as a String. Example "50".Method Detail |
public String getName()
getName
in interface ReadOnlyProperty
public void setValue(String newValue)
public String getValue()
getValue
in interface ReadOnlyProperty
public void addChild(Property aProperty)
aProperty
- new property to add as this property's child.public Property[] getChildren(String aName)
aName
- name (key) of child properties to retrieve.
public Property getChild(String aName)
aName
- name (key) of child property to retrieve.
public ReadOnlyProperty[] getReadOnlyChildren(String aName)
getReadOnlyChildren
in interface ReadOnlyProperty
aName
- name (key) of child properties to retrieve.
public ReadOnlyProperty getReadOnlyChild(String aName)
getReadOnlyChild
in interface ReadOnlyProperty
aName
- name (key) of child properties to retrieve.
public Property getChild(String aName, String aValue)
aName
- name (key) of child property to retrieve.aValue
- value of child property to retrieve.
public ReadOnlyProperty getReadOnlyChild(String aName, String aValue)
getReadOnlyChild
in interface ReadOnlyProperty
aName
- name (key) of child property to retrieve.aValue
- value of child property to retrieve.
public Property[] getChildren()
public ReadOnlyProperty[] getReadOnlyChildren()
getReadOnlyChildren
in interface ReadOnlyProperty
public String[] getChildValues(String aName)
getChildValues
in interface ReadOnlyProperty
aName
- name (key) of child property to retrieve.
public String getChildValue(String aName)
getChildValue
in interface ReadOnlyProperty
aName
- name (key) of child property to retrieve.
public String getChildValue(String aName, String defaultValue)
getChildValue
in interface ReadOnlyProperty
aName
- name (key) of child property to retrieve.
public int getChildValueAsInt(String aName) throws FormatException
getChildValueAsInt
in interface ReadOnlyProperty
aName
- name (key) of child property to retrieve.
RecordReadError
- if no field by the given name can be found
FormatException
public int getChildValueAsInt(String aName, int defaultValue)
getChildValueAsInt
in interface ReadOnlyProperty
aName
- name (key) of child property to retrieve.
public String[] getChildNames()
getChildNames
in interface ReadOnlyProperty
|
Arch4J 1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |