Remove( ) method (Map Collections)
- Last Updated: February 11, 2026
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
Removes a key-value pair from the collection, if it can be found. You can search the collection for a specific key or key-value pair. In both cases, the equality comparer implementation (default or custom) identifies if the key can be found. In the case of the key-value pair search, the value object is also checked for a match (meaning both key and value must match). If found and removed, the method returns TRUE; otherwise, it returns FALSE.
Return type: LOGICAL
Access: PUBLIC
Applies to: Progress.Collections.HashMap<K,V> class
Syntax
|
- key
- The key to be removed from the collection.
- pair
- The key-value pair object to be removed from the collection.
For the method that takes a KeyValuePair<K,V>, the
Equals() method is called on the value object to detect if the
value object associated with the found key is the same.
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.