deferred class HASHABLE

Features exported to INTERNALS_HANDLER

Ancestor class for all hashable objects.

For example, the hash_code is needed for HASHED_DICTIONARY and for HASHED_SET. Thus, most standard objects are HASHABLE (STRING, REAL, INTEGER_8, INTEGER_16, INTEGER_32, INTEGER_64, POINTER, NUMBER, MUTABLE_BIG_INTEGER, and so forth).

Direct parents

non-conformant parents

ANY

Known children

conformant children

ADDRESS, CHARACTER, HIERARCHIC_GRAPH_NODE, MICROSECOND_TIME, MUTABLE_BIG_INTEGER, NUMBER, NUMERIC, POINT, POINTER, SENSITIVE, STRING, TIME, UNICODE_STRING

non-conformant children

DRAWABLE

Summary

exported features

Details

deferred hash_code: INTEGER

The hash-code value of Current.

ensure

  • good_hash_value: Result >= 0

deferred is_equal (other: HASHABLE): BOOLEAN

Is other attached to an object considered equal to current object ?

require

  • other /= Void

ensure

  • Result implies hash_code = other.hash_code
  • commutative: generating_type = other.generating_type implies Result = other.is_equal(Current)