Package com.postman.collection
Class PropertyList<T>
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<Property>,Collection<Property>,List<Property>,RandomAccess
Postman SDK analog: PropertyList
Extends ArrayList with Map like capabilities, including:
- Support for retrieving by variable key which is always
Property.getKey() - Support for retrieving by index
- Support for adding by index
- Duplicate keys are not allowed
- Null keys are allowed.
- Contains returns results based on
Property.equals(Object) - Set will set the value of the variable in this ListMap if it exists, otherwise it will set the value of the specified
index - the
addmethod returns false if the specified key already exists in the collection and does not change the collection
- See Also:
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount -
Constructor Summary
ConstructorsConstructorDescriptionReturns an emptyPropertyListPropertyList(ArrayList<Property> vars) Returns a PropertyList populated with the contents ofvars -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanaddAll(int index, PropertyList<Property> vars) booleanaddAll(PropertyList<Property> vars) booleanbooleancontainsKey(String key) get(int index) Get a variable whose key matcheskey, or null if it is not presentintvoidMethods inherited from class java.util.ArrayList
add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, size, sort, spliterator, subList, toArray, toArray, trimToSizeMethods inherited from class java.util.AbstractCollection
containsAll, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, stream, toArrayMethods inherited from interface java.util.List
containsAll
-
Constructor Details
-
PropertyList
Returns a PropertyList populated with the contents ofvars- Parameters:
vars- ArrayList<Property> of variables
-
PropertyList
public PropertyList()Returns an emptyPropertyList
-
-
Method Details
-
get
Get a variable whose key matcheskey, or null if it is not present- Parameters:
key-- Returns:
- Property
-
containsKey
- Parameters:
key-- Returns:
- boolean
-
get
-
contains
- Parameters:
compare-- Returns:
- boolean
-
indexOf
- Parameters:
pvVar-- Returns:
- int
-
add
-
addAll
- Parameters:
vars-- Returns:
- boolean
-
addAll
- Parameters:
index-vars-- Returns:
- boolean
-
remove
- Parameters:
key-
-
set
-
set
-