Values in StreamableHash[Int]Maps must be Streamable, so let the compiler know.

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