Description
This class is a wrapper around rawpilot.HashTableValue. Note that unlike other array
values, this class is not iterable directly. For convenience, the methods toDictionary() and
fromDictionary() are provided. These allow export of data to, and import of data from, a
Python dictionary. This class is part of the pilotpython module, which is available in the
Python (on Server) component.
class HashTableValue(Value)
| HashTableValue.__init__(value) |
| Description |
Constructor. |
| Input parameters |
param value: Property value to
wrap type value: swigpython3.Value |
| Return value |
None |
| HashTableValue.addKeyAndItem(key, item) |
| Description |
Takes the given key and value, and appends them to the hash table as a new
entry. |
| Input parameters |
param key: Key of the new entry type
key: pilotpython.Value param
item: The new entry's item type
entry: pilotpython.Value |
| Return value |
None |
| HashTableValue.clear() |
| Description |
Empties the hash table. |
| Input parameters |
None |
| Return value |
None |
| HashTableValue.containsKey(key) |
| Description |
Tests for the presence of a hash entry with the given key. |
| Input parameters |
param key: Key to look for type
key: pilotpython.Value |
| Return value |
returns: True if the key is found, False
otherwise rtype: bool |
| HashTableValue.find(key) |
| Description |
Returns the item belonging to the given key, or None if the key is not
found. |
| Input parameters |
param key: The hash key to look
for type key: pilotpython.Value |
| Return value |
returns: The hash item or
None rtype: pilotpython.Value |
| HashTableValue.findIndex(key) |
| Description |
Finds the index at which the given key is stored. |
| Input parameters |
param key: The key to look for type
key: pilotpython.Value |
| Return value |
returns: index rtype:
int |
| HashTableValue.fromDictionary(dict) |
| Description |
Replaces the contents of this HashTableValue with the contents of the given
dictionary. |
| Input parameters |
param dict: Source dictionary type
dict: dictionary |
| Return value |
None |
| HashTableValue.get() |
| Description |
Gets the contents of the hash array value as a Python dictionary
object. |
| Input parameters |
None |
| Return value |
returns: The contents of the value
rtype: dict |
| HashTableValue.getItems() |
| Description |
Gets all the hash table's items. |
| Input parameters |
None |
| Return value |
returns: The set of items
rtype:pilotpython.ValueArrayValue |
| HashTableValue.getIthItem(index) |
| Description |
Returns the item at the given index of the hash map. |
| Input parameters |
param index: Index of item type
index: int |
| Return value |
returns: The hash item
rtype: pilotpython.Value |
| HashTableValue.getIthKey(index) |
| Description |
Returns the key at the given index of the hash map. |
| Input parameters |
param index: Index of key type
index: int |
| Return value |
returns: The hash key
rtype: pilotpython.Value |
| HashTableValue.getKeys() |
| Description |
Gets all the hash table's keys. |
| Input parameters |
None |
| Return value |
returns: The set of
keys rtype:pilotpython.ValueArrayValue |
| HashTableValue.removeKey(key) |
| Description |
Removes the hash entry identified by the given key. |
| Input parameters |
param key: Key to remove type
key: pilotpython.Value |
| Return value |
None |
| HashTableValue.set(value) |
| Description |
Sets the contents of this value from the given Python dictionary. |
| Input parameters |
param value: The new data to load into the hash
table type value: dict |
| Return value |
None |
| HashTableValue.setCaseSensitive(isCaseSensitive) |
| Description |
Defines the case sensitivity of the hash map (for find operations). |
| Input parameters |
param isCaseSensitive: True or False
type isCaseSensitive: bool |
| Return value |
None |
| HashTableValue.toDictionary() |
| Description |
Returns a copy of the hash table value as a Python dictionary. |
| Input parameters |
None |
| Return value |
None |
Methods inherited from Value
| HashTableValue.CreateValue(classTag) |
| Description |
Creates a new pilotpython.Value instance of the type specified by classTag. The
Value instance must be deleted using Value.deleteInstance() after use. The exception
is the ValueArrayValue type, which takes ownershipof any values added to it. The
ValueHolder class can be used to store the newly created value. When a ValueHolder
moves out of scope, the value it contains is destroyed. |
| Input parameters |
param classTag: Tag specifying the class of value to
create type classTag: str |
| Return value |
None |
| HashTableValue.GetValue(rawVal) |
| Description |
Takes a rawpilot.Value and returns it wrapped in its pilotpython.Value. |
| Input parameters |
rawVal |
| Return value |
None |
| HashTableValue.cloneValue() |
| Description |
Creates a clone (deep copy) of the value. |
| Input parameters |
None |
| Return value |
returns: Deep copy of value
rtype: Value |
| HashTableValue.deleteInstance() |
| Description |
Deletes an instance of a value. Any value created with cloneValue() or
newInstanceXXX(), and not assigned to a property, must be deleted. |
| Input parameters |
None |
| Return value |
None |
| HashTableValue.getBoolArray() |
| Description |
Returns a copy(!) of the entire data set of a BooleanArrayValue. |
| Input parameters |
None |
| Return value |
returns: All bools contained in value
rtype: list |
| HashTableValue.getBoolean() |
| Description |
Returns the value's contents as a boolean value. |
| Input parameters |
None |
| Return value |
returns: Data as a boolean
rtype: bool |
| HashTableValue.getByteArray() |
| Description |
Returns a read-only view of the binary data. |
| Input parameters |
None |
| Return value |
returns: Byte array data
rtype: memoryview |
| HashTableValue.getClassTag() |
| Description |
Returns the value's type in Pipeline Pilot notation. |
| Input parameters |
None |
| Return value |
returns: A class tag
rtype: str |
| HashTableValue.getFloat() |
| Description |
Returns the value's contents as a float. |
| Input parameters |
None |
| Return value |
returns: Value contents as float
rtype: float |
| HashTableValue.getFloatArray() |
| Description |
Returns a copy(!) of the entire data set of a DoubleArrayValue. |
| Input parameters |
None |
| Return value |
returns: All floats contained in value
rtype: list |
| HashTableValue.getIntArray() |
| Description |
Returns a copy(!) of the entire dataset of an IntegerArrayValue. |
| Input parameters |
None |
| Return value |
returns: All ints contained in value
rtype: list |
| HashTableValue.getInteger() |
| Description |
Returns the value's contents as an int. |
| Input parameters |
None |
| Return value |
returns: Data as int
rtype: int |
| HashTableValue.getIthBoolean(index) |
| Description |
For ArrayValues: returns the data at index as a boolean value. This operation
is not supported by all ArrayValue types. |
| Input parameters |
param index: Index to use type
index: int |
| Return value |
returns: bool at given index
rtype: bool |
| HashTableValue.getIthFloat(index) |
| Description |
For ArrayValues: returns the data at index as a float. This operation is not
supported by all ArrayValue types. |
| Input parameters |
param index: Index to use type
index: int |
| Return value |
returns: Float at given index
rtype: float |
| HashTableValue.getIthInteger(index) |
| Description |
For ArrayValues: returns the data at index as an int. This operation is not
supported by all ArrayValue types. |
| Input parameters |
param index: Index to use type
index: int |
| Return value |
returns: int at given index
rtype: int |
| HashTableValue.getIthString(index) |
| Description |
For ArrayValues: returns the data at index as a string. This operation is not
supported by all ArrayValue types. |
| Input parameters |
param index: Index to use type
index: int |
| Return value |
returns: String at given index
rtype: str |
| HashTableValue.getRawValue() |
| Description |
Returns the raw swigpython3 Value instance wrapped by this instance. |
| Input parameters |
None |
| Return value |
returns: Wrapped
value rtype: swigpython3.Value (or subclass). See
getClassTag() for details. |
| HashTableValue.getSize() |
| Description |
Returns the size of the value. |
| Input parameters |
None |
| Return value |
returns: Number of elements
rtype: int |
| HashTableValue.getString() |
| Description |
Returns the value's contents as a string. |
| Input parameters |
None |
| Return value |
returns: Value contents as string
rtype: str |
| HashTableValue.getStringArray() |
| Description |
Returns a copy(!) of the entire data set of a StringArrayValue. |
| Input parameters |
None |
| Return value |
returns: all strings contained in value
rtype: list |
| HashTableValue.setBoolean(val) |
| Description |
Sets the value to the given boolean value |
| Input parameters |
param val: Value to set type
val: bool |
| Return value |
None |
| HashTableValue.setFloat(val) |
| Description |
Sets the value's data to the given float value |
| Input parameters |
param val: Value to set type
val: float |
| Return value |
None |
| HashTableValue.setInteger(val) |
| Description |
Sets the value's data to the given int value. |
| Input parameters |
param val: Value to set type
val: int |
| Return value |
None |
| HashTableValue.setString(val) |
| Description |
Sets the value to the supplied string. The wrapped Value must support this
operation. |
| Input parameters |
param val: string to set type
val: str |
| Return value |
None |
Data descriptors inherited from Value
| HashTableValue.__dict__ |
| Description |
dictionary for instance variables (if defined) |
| HashTableValue.__weakref__ |
| Description |
list of weak references to the object (if defined) |