Class AllowedValue

java.lang.Object
org.cybergarage.upnp.AllowedValue

public class AllowedValue extends Object
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
    Modifier and Type
    Field
    Description
    static final String
    The XML element name for allowed value nodes in SCPD documents.
  • Constructor Summary

    Constructors
    Constructor
    Description
    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 Type
    Method
    Description
    org.cybergarage.xml.Node
    Returns the underlying XML node representing this allowed value.
    Returns the value string of this allowed value.
    static boolean
    isAllowedValueNode(org.cybergarage.xml.Node node)
    Checks if the given XML node represents an allowed value element.
    void
    Sets the value string for this allowed value.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • ELEM_NAME

      public static final String 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

      public AllowedValue(String value)
      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:
      true if the node's name matches the allowed value element name, false otherwise
    • setValue

      public void setValue(String value)
      Sets the value string for this allowed value.
      Parameters:
      value - the value to set
    • getValue

      public String getValue()
      Returns the value string of this allowed value.
      Returns:
      the value string