Commit Graph

3 Commits

Author SHA1 Message Date
Ray Greenwell f778c1e518 - Created a Map interface.
- Renamed HashMap Hashtable, because I wanted a version without ties to
  mx.* code. User-defined hashing functions may be specified.
- Created a subclass of Hashtable called HashMap which uses
  functions in mx.utils.ObjectUtil to hash non-Hashable complex keys.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4120 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-05-16 19:02:24 +00:00
Ray Greenwell 470c46acf5 Oop, clear complex entries when we clear.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4119 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-05-16 01:53:23 +00:00
Ray Greenwell c203c0e861 A HashMap in actionscript that can use arbitrary objects as keys.
Internally, three different things may be done for storage:
- Simple keys can utilize the Dictionary class, we just use one of those
  inside the map.
- If the key implements Hashable, we can hash it.
- Otherwise, use mx.utils.ObjectUtil to generate a hash for any other key and
  also to compare the keys. Keys are then wrapped in a KeyWrapper object
  that implements Hashable. This last case will also handle null as a key.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4117 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-05-16 01:49:51 +00:00