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:
@@ -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 HashIntMap<V>
|
public class StreamableHashIntMap<V extends Streamable> 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 HashMap<K, V>
|
public class StreamableHashMap<K, V extends Streamable> extends HashMap<K, V>
|
||||||
implements Streamable
|
implements Streamable
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Creates an empty StreamableHashMap.
|
* 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>();
|
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.
|
* 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);
|
return new StreamableHashMap<K, V>(map);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user