public class AllowedValueList extends Vector<AllowedValue>
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:
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.
| Modifier and Type | Field and Description |
|---|---|
static String |
ELEM_NAME
XML element name for allowed value list in UPnP descriptions.
|
capacityIncrement, elementCount, elementDatamodCount| Constructor and Description |
|---|
AllowedValueList()
Creates an empty allowed value list.
|
AllowedValueList(String[] values)
Creates an allowed value list from an array of value strings.
|
| 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.
|
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, trimToSizefinalize, getClass, notify, notifyAll, wait, wait, waitparallelStream, streampublic static final String ELEM_NAME
public AllowedValueList()
public AllowedValueList(String[] values)
values - the array of value strings to add to the listpublic AllowedValue getAllowedValue(int n)
n - the index of the allowed value to retrievepublic boolean isAllowed(String v)
v - the value to check