java.lang.Object
org.cybergarage.upnp.AllowedValue
Represents a single allowed value for a UPnP state variable.
State variables can define a list of allowed values that constrain the possible values the variable can take. This class represents one such allowed value as defined in the service's SCPD document.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAllowedValue(String value) Constructs an allowed value with the specified value string.AllowedValue(org.cybergarage.xml.Node node) Constructs an allowed value from an existing XML node. -
Method Summary
Modifier and TypeMethodDescriptionorg.cybergarage.xml.NodeReturns the underlying XML node representing this allowed value.getValue()Returns the value string of this allowed value.static booleanisAllowedValueNode(org.cybergarage.xml.Node node) Checks if the given XML node represents an allowed value element.voidSets the value string for this allowed value.
-
Field Details
-
ELEM_NAME
The XML element name for allowed value nodes in SCPD documents.- See Also:
-
-
Constructor Details
-
AllowedValue
public AllowedValue(org.cybergarage.xml.Node node) Constructs an allowed value from an existing XML node.- Parameters:
node- the XML node representing the allowed value
-
AllowedValue
Constructs an allowed value with the specified value string.Creates a new XML node structure for the allowed value.
- Parameters:
value- the value string to associate with this object
-
-
Method Details
-
getAllowedValueNode
public org.cybergarage.xml.Node getAllowedValueNode()Returns the underlying XML node representing this allowed value.- Returns:
- the allowed value XML node
-
isAllowedValueNode
public static boolean isAllowedValueNode(org.cybergarage.xml.Node node) Checks if the given XML node represents an allowed value element.- Parameters:
node- the XML node to check- Returns:
trueif the node's name matches the allowed value element name,falseotherwise
-
setValue
Sets the value string for this allowed value.- Parameters:
value- the value to set
-
getValue
Returns the value string of this allowed value.- Returns:
- the value string
-