ContainsKey( ) method
- Last Updated: March 15, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
Returns TRUE if the key exists in the collection, according to the equality comparer implementation (default or custom), otherwise returns FALSE. Note that the implementation always uses the comparer when determining if the key can be found in the collection, that is, the comparer’s implementation decides if the passed in object is the same as an existing key in the map.
Return type: LOGICAL
Access: PUBLIC
Applies to: Progress.Collections.HashMap<K,V> class
Syntax
|
- key
- The key to locate in the collection,
The method raises an error if:
- The key object does not implement
Progress.Collections.IHashable, if using the default equality comparer implementation. - The key object is not a valid object reference (including the Unknown value
(
?)), if using the default equality comparer. - The equality comparer object specified via the specific constructor has become invalid.
- The custom equality comparer raises an error.