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

public class AllowedValueListextends Vector<AllowedValue>
A collection of UPnP allowed value constraints.

This class extends Vector to manage multiple AllowedValue objects that represent allowed value constraints for state variables in UPnP services. It provides type-safe collection management for allowed value definitions.

Key features:

  • Type-safe allowed value collection
  • XML element name constant
  • Vector-based implementation for efficiency
  • Iterator support for traversal
  • Service description integration

This class is used by UPnP services to manage collections of allowed value constraints for state variables, enabling proper XML description generation and validation of variable value sets.

See Also:
  • Field Details

    • ELEM_NAME

      public static final String ELEM_NAME
      XML element name for allowed value list in UPnP descriptions.
      See Also:
  • Constructor Details

    • AllowedValueList

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

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

    • getAllowedValue

      public AllowedValue getAllowedValue(int n)
      Gets 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
    • isAllowed

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