Contains( ) method (Map Collections)
- Last Updated: March 15, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
Returns TRUE if the key-value pair exists in the collection, that is if the key is found and it is associated with the given value, 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 determines if the passed in key is the same as an existing key in the map.
Return type: LOGICAL
Access: PUBLIC
Applies to: Progress.Collections.HashMap<K,V> class
Syntax
|
- pair
- The key-value pair object to be located.
The Equals() method is called on the value object to detect if the
value object associated with the found key is the same.
This method raises an error if the comparer object specified via the specific
constructor has become invalid, or if the custom comparer raises an error, or the
key does not implement IHashable, if using the default
comparer.