Class AllowedValueList

All Implemented Interfaces:
Serializable, Cloneable, Iterable, Collection, List, RandomAccess, SequencedCollection

public class AllowedValueList extends Vector
A list of AllowedValue objects for a state variable.

This class represents the set of allowed values that constrain a UPnP state variable. It extends Vector to provide type-safe access to allowed values and includes validation methods.

See Also:
  • Field Details

    • ELEM_NAME

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

    • AllowedValueList

      public AllowedValueList()
      Constructs an empty allowed value list.
    • AllowedValueList

      public AllowedValueList(String[] values)
      Constructs an allowed value list from an array of strings.
      Parameters:
      values - the array of allowed value strings
  • Method Details

    • getAllowedValue

      public AllowedValue getAllowedValue(int n)
      Returns the allowed value at the specified index.
      Parameters:
      n - the index of the allowed value to retrieve
      Returns:
      the allowed value at the specified index
      Throws:
      ArrayIndexOutOfBoundsException - if the index is out of range
    • isAllowed

      public boolean isAllowed(String v)
      Checks if the specified value is in the allowed value list.
      Parameters:
      v - the value string to check
      Returns:
      true if the value is allowed, false otherwise