Class AllowedValueRange

java.lang.Object
org.cybergarage.upnp.AllowedValueRange

public class AllowedValueRange extends Object
Represents an allowed value range for a UPnP state variable.

This class defines a numeric range constraint for state variables, including minimum, maximum, and optional step values. It is used when a state variable can take any numeric value within a specified range.

See Also:
  • Field Details

    • ELEM_NAME

      public static final String ELEM_NAME
      The XML element name for allowed value range nodes in SCPD documents.
      See Also:
  • Constructor Details

    • AllowedValueRange

      public AllowedValueRange(org.cybergarage.xml.Node node)
      Constructs an allowed value range from an existing XML node.
      Parameters:
      node - the XML node representing the allowed value range
    • AllowedValueRange

      public AllowedValueRange()
      Constructs an empty allowed value range.
    • AllowedValueRange

      public AllowedValueRange(Number max, Number min, Number step)
      Constructs an allowed value range with specified bounds and step.
      Parameters:
      max - the maximum allowed value, or null to omit
      min - the minimum allowed value, or null to omit
      step - the step increment, or null to omit
  • Method Details

    • getAllowedValueRangeNode

      public org.cybergarage.xml.Node getAllowedValueRangeNode()
      Returns the underlying XML node representing this allowed value range.
      Returns:
      the allowed value range XML node
    • isAllowedValueRangeNode

      public static boolean isAllowedValueRangeNode(org.cybergarage.xml.Node node)
      Checks if the given XML node represents an allowed value range element.
      Parameters:
      node - the XML node to check
      Returns:
      true if the node's name matches the allowed value range element name, false otherwise
    • setMinimum

      public void setMinimum(String value)
      Sets the minimum allowed value.
      Parameters:
      value - the minimum value as a string
    • getMinimum

      public String getMinimum()
      Returns the minimum allowed value.
      Returns:
      the minimum value as a string
    • setMaximum

      public void setMaximum(String value)
      Sets the maximum allowed value.
      Parameters:
      value - the maximum value as a string
    • getMaximum

      public String getMaximum()
      Returns the maximum allowed value.
      Returns:
      the maximum value as a string
    • setStep

      public void setStep(String value)
      Sets the step increment for the range.

      The step defines the granularity of allowed values within the range.

      Parameters:
      value - the step increment as a string
    • getStep

      public String getStep()
      Returns the step increment for the range.
      Returns:
      the step increment as a string