c203c0e861
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
12 lines
222 B
ActionScript
12 lines
222 B
ActionScript
package com.threerings.util {
|
|
|
|
public interface Hashable extends Equalable
|
|
{
|
|
/**
|
|
* Get a hashcode for this Equalable object so that it may be placed
|
|
* in a HashMap.
|
|
*/
|
|
function hashCode () :int;
|
|
}
|
|
}
|