The hash value.
SDKs
- macOS 10.15+
- Xcode 11.0+
Framework
- Swift
UI
Declaration
@nonobjc var hashValue: Int { get }
Discussion
NSObject
implements this by returning self
.
NSObject
is not overridable; subclasses can customize hashing by overriding the hash
property.
Axiom: x == y
implies x
Note
the hash value is not guaranteed to be stable across different invocations of the same program. Do not persist the hash value across program runs.