- All Implemented Interfaces:
Serializable, Cloneable, Iterable<AllowedValue>, Collection<AllowedValue>, List<AllowedValue>, RandomAccess, SequencedCollection<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 Summary
FieldsFields inherited from class Vector
capacityIncrement, elementCount, elementDataFields inherited from class AbstractList
modCountConstructor Summary
ConstructorsConstructorDescriptionCreates an empty allowed value list.AllowedValueList(String[] values) Creates an allowed value list from an array of value strings.Method Summary
All MethodsModifier and TypeMethodDescriptiongetAllowedValue(int n) Gets the allowed value at the specified index.booleanChecks if the specified value is in the allowed value list.Methods inherited from class 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, trimToSizeMethods inherited from interface Collection
parallelStream, stream, toArrayMethods inherited from interface List
addFirst, addLast, getFirst, getLast, removeFirst, removeLast, reversed
Field Details
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
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
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
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