Progress.Collections.IHashable interface
- Last Updated: February 11, 2026
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
Progress.Collections.IHashable is an interface which allows objects to be
used as keys. The interface provides the implementation for generating the hash code
(via the HashCode() method) and is also capable of identifying when
a key is considered the same (via the Equals() method).
Public Properties
The interface has no public properties.
Public Methods
| Equals( ) method | HashCode( ) method (IHashable) |
Notes
- The ABL HASH-CODE function can be used in your implementation of
HashCode()to generate a hash code for data of various data types. - You should override the
Equals()method (available on anyProgress.Lang.Object) in order to properly identify when a key is the same as another key. - Two objects that are considered the same, must return the same hash code. If
obj1:Equals(obj2)returns TRUE, thenobj2:Equals(obj1)must also return TRUE, andobj1:HashCode()must be the same asobj2:HashCode(). That implies that the same values should be used when identifying equality and generating the hash code. Note that different objects may return the same hash code. - The
HashCode()andEquals()methods should not return the Unknown value (?).
Example
The following is an example of a class named Employee, that
implements the Progress.Collections.IHashable interface.
|