pdk.flow.Map
contains functions that can be applied to pdk.core.Map variables
All functions
put
Associates the specified value with the specified key in the map (optional operation). If the map previously contained a mapping for the key, the old value is replaced by the specified value.
Arguments:
map :: pdk.core.Map<T>
key :: pdk.core.String
value :: T
Result:
No variable is returned. The input map contains the new element with the defined key.
Possible exceptions
NullPointerException - throws if the input map or key is
NULL
Example:
putAll
Copies all of the mappings from the specified map to the map (optional operation). The effect of this call is equivalent to that of calling put(k, v) on this map once for each mapping from key k to value v in the specified map.
Arguments:
map :: pdk.core.Map<T>
mapToAppend :: pdk.core.Map<T>
Result:
No variable is returned. The map contains new records.
Possible exceptions
NullPointerException - throws an error if any of the input maps is
NULL
Example:
putIfAbsent
If the specified key is not already associated with a value associates it with the given value and returns null, else returns the current value.
Arguments:
map :: pdk.core.Map<T>
key :: pdk.core.String
value :: T
Result:
output :: T
Possible exceptions
NullPointerException - throws an error if the input map or the key is
NULL
Example:
get
Returns the value to which the specified key is mapped, or null if the map contains no mapping for the key.
Arguments:
map :: pdk.core.Map<T>
key :: pdk.core.String
Result:
output :: T
Possible exceptions
NullPointerException - throws an error if the input map or the key is
NULL
Example:
clear
Removes all of the mappings from this map.
Arguments:
map :: pdk.core.Map<T>
Result:
No variable is returned. The map is clean.
Possible exceptions
NullPointerException - throws an error if the input map is
NULL
Example:
remove
Removes the mapping for a key from the map if it is present (optional operation).
Arguments:
map :: pdk.core.Map<T>
key :: pdk.core.String
Result:
No variable is returned. The map doesn't contain entry with the input key.
Possible exceptions
NullPointerException - throws an error if the input map or the key is
NULL
Example:
replace
Replaces the entry for the specified key only if it is currently mapped to some value. Returns the previous value associated with the specified key, or null if there was no mapping for the key.
The main distinction from putIfAbsent is that the value will not be added if the input map does not contain the specified key.
Arguments:
map :: pdk.core.Map<T>
key :: pdk.core.String
value :: T
Result:
Output :: T
Possible exceptions
NullPointerException - throws an error if the input map or the key is
NULL
Example:
Last updated