From e3ae54ddb41b1cc6ac3f0040c8b51cb4b164c6e8 Mon Sep 17 00:00:00 2001 From: Nathan Curtis Date: Mon, 9 Aug 2010 18:34:26 +0000 Subject: [PATCH] Add a comment so people don't accidentally new StreamableHashMap(), and expect it to work. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6106 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- src/as/com/threerings/util/StreamableHashMap.as | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/as/com/threerings/util/StreamableHashMap.as b/src/as/com/threerings/util/StreamableHashMap.as index b65721db4..55591c1d6 100644 --- a/src/as/com/threerings/util/StreamableHashMap.as +++ b/src/as/com/threerings/util/StreamableHashMap.as @@ -40,6 +40,14 @@ import com.threerings.util.maps.ImmutableMap; public class StreamableHashMap extends ForwardingMap implements Streamable { + /** + * Creates a new StreamableHashMap. + * + * @param keyClazz The class to use as the map key. May be null, but this functionality is + * provided only for deserialization. A StreamableHashMap that has not been initialized + * properly by either a non-null keyClazz or via readObject will throw errors on write and + * always return null on read. + */ public function StreamableHashMap (keyClazz :Class = null) { super(keyClazz == null ? DEFAULT_MAP : Maps.newMapOf(keyClazz));