Boo, Ray's right; I can't do that.

Not all streamable things are Streamable (e.g. String, Integer)

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6211 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Dave Hoover
2010-10-15 20:53:21 +00:00
parent 88239d8c42
commit ce3538c409
2 changed files with 4 additions and 5 deletions
@@ -36,7 +36,7 @@ import com.threerings.io.Streamable;
* @see Streamable * @see Streamable
* @param <V> the type of value stored in this map. * @param <V> the type of value stored in this map.
*/ */
public class StreamableHashIntMap<V extends Streamable> extends HashIntMap<V> public class StreamableHashIntMap<V> extends HashIntMap<V>
implements Streamable implements Streamable
{ {
/** /**
@@ -38,13 +38,13 @@ import com.threerings.io.Streamable;
* @param <K> the type of key stored in this map. * @param <K> the type of key stored in this map.
* @param <V> the type of value stored in this map. * @param <V> the type of value stored in this map.
*/ */
public class StreamableHashMap<K, V extends Streamable> extends HashMap<K, V> public class StreamableHashMap<K, V> extends HashMap<K, V>
implements Streamable implements Streamable
{ {
/** /**
* Creates an empty StreamableHashMap. * Creates an empty StreamableHashMap.
*/ */
public static <K, V extends Streamable> StreamableHashMap<K, V> newMap () public static <K, V> StreamableHashMap<K, V> newMap ()
{ {
return new StreamableHashMap<K, V>(); return new StreamableHashMap<K, V>();
} }
@@ -52,8 +52,7 @@ public class StreamableHashMap<K, V extends Streamable> extends HashMap<K, V>
/** /**
* Creates StreamableHashMap populated with the same values as the provided Map. * Creates StreamableHashMap populated with the same values as the provided Map.
*/ */
public static <K, V extends Streamable> StreamableHashMap<K, V> newMap ( public static <K, V> StreamableHashMap<K, V> newMap (Map<? extends K, ? extends V> map)
Map<? extends K, ? extends V> map)
{ {
return new StreamableHashMap<K, V>(map); return new StreamableHashMap<K, V>(map);
} }