org.cybergarage.upnp

## Class AllowedValueList

- java.lang.Object
- - java.util.AbstractCollection<E>
  - - java.util.AbstractList<E>
    - - java.util.Vector<AllowedValue>
      - - org.cybergarage.upnp.AllowedValueList

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

      public class AllowedValueList
      extends 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:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `ELEM_NAME` XML element name for allowed value list in UPnP descriptions.

    - ### Fields inherited from class java.util.Vector

      `capacityIncrement, elementCount, elementData`

    - ### Fields inherited from class java.util.AbstractList

      `modCount`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AllowedValueList()` Creates an empty allowed value list.
    `AllowedValueList(String[] values)` Creates an allowed value list from an array of value strings.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `AllowedValue` | `getAllowedValue(int n)` Gets the allowed value at the specified index.
    `boolean` | `isAllowed(String v)` Checks if the specified value is in the allowed value list.

    - ### Methods inherited from class java.util.Vector

      `add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, forEach, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeIf, removeRange, replaceAll, retainAll, set, setElementAt, setSize, size, sort, spliterator, subList, toArray, toArray, toString, trimToSize`

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface java.util.Collection

      `parallelStream, stream`

- - ### Field Detail

    - #### ELEM_NAME

          public static final String ELEM_NAME

      XML element name for allowed value list in UPnP descriptions.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### 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 Detail

    - #### 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