|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectumontreal.iro.lecuyer.xmlconfig.AbstractParam
umontreal.iro.lecuyer.xmlconfig.PropertyParam
public class PropertyParam
Represents a property, i.e., a name-value pair.
Constructor Summary | |
---|---|
PropertyParam()
Nullary constructor for the parameter reader. |
|
PropertyParam(String name,
String value)
Constructs a new property with name name, and value value. |
Method Summary | |
---|---|
void |
check()
Verifies that every needed parameter was specified. |
PropertyParam |
clone()
|
boolean |
equals(Object o)
|
String |
getName()
Returns the name of this property. |
String |
getValue()
Returns the value of this property. |
int |
hashCode()
|
void |
setName(String name)
Sets the name of the property to name. |
void |
setValue(String value)
Sets the value of this property to value. |
Element |
toElement(ClassFinder finder,
Node parent,
String elementName,
int spc)
Converts this parameter object to a DOM element using the class finder finder for formatting class names, with parent node parent, element name elementName, and spc spaces for each indentation level. |
String |
toString()
|
Methods inherited from class umontreal.iro.lecuyer.xmlconfig.AbstractParam |
---|
createDocument, getId, getXref, setId, setXref, write, write, write, write, write, write, write, write |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PropertyParam()
public PropertyParam(String name, String value)
name
- the name.value
- the value.
NullPointerException
- if name is null.Method Detail |
---|
public String getName()
public void setName(String name)
name
- the new name of the property.
NullPointerException
- if name is null.public String getValue()
public void setValue(String value)
value
- the value of this property.
NullPointerException
- if value is null.public void check()
AbstractParam
ParamReadException
in case of missing parameters.
check
in class AbstractParam
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class AbstractParam
public Element toElement(ClassFinder finder, Node parent, String elementName, int spc)
StorableParam
Element
instance with name elementName and add it to the
node parent of the DOM tree. It is recommended to use
DOMUtils
helper methods for this. After the element is created,
attributes can be set and nested contents can be added. The configured DOM
element is then returned.
toElement
in interface StorableParam
finder
- the class finder used to format class names.parent
- the parent of the new element.elementName
- the name of the constructed element.spc
- the number of spaces for each indentation level.
public PropertyParam clone()
clone
in class Object
|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |