Remove( ) method (Map Collections)
- Last Updated: August 5, 2025
- 1 minute read
- OpenEdge
- Version 12.8
- 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.
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.