|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.AbstractMap<K,V>
java.util.HashMap<K,V>
com.threerings.util.StreamableHashMap<K,V>
K - the type of key stored in this map.V - the type of value stored in this map.@ReplacedBy(value="java.util.Map") public class StreamableHashMap<K,V>
A HashMap extension that can be streamed. The keys and values in the map must also be
of streamable types.
Streamable,
Serialized Form| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.util.AbstractMap |
|---|
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V> |
| Nested classes/interfaces inherited from interface com.threerings.io.Streamable |
|---|
Streamable.Closure |
| Constructor Summary | |
|---|---|
StreamableHashMap()
Constructs an empty hash map with the default number of hash buckets. |
|
StreamableHashMap(int buckets,
float loadFactor)
Constructs an empty hash map with the specified number of hash buckets. |
|
StreamableHashMap(Map<? extends K,? extends V> map)
Constructs a hash map with the default number of hash buckets, populated with the same values as the provided Map. |
|
| Method Summary | ||
|---|---|---|
static
|
newMap()
Creates an empty StreamableHashMap. |
|
static
|
newMap(Map<? extends K,? extends V> map)
Creates StreamableHashMap populated with the same values as the provided Map. |
|
void |
readObject(ObjectInputStream in)
Reads our custom streamable fields. |
|
void |
writeObject(ObjectOutputStream out)
Writes our custom streamable fields. |
|
| Methods inherited from class java.util.HashMap |
|---|
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values |
| Methods inherited from class java.util.AbstractMap |
|---|
equals, hashCode, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Map |
|---|
equals, hashCode |
| Constructor Detail |
|---|
public StreamableHashMap(int buckets,
float loadFactor)
public StreamableHashMap()
public StreamableHashMap(Map<? extends K,? extends V> map)
| Method Detail |
|---|
public static <K,V> StreamableHashMap<K,V> newMap()
public static <K,V> StreamableHashMap<K,V> newMap(Map<? extends K,? extends V> map)
public void writeObject(ObjectOutputStream out)
throws IOException
IOException
public void readObject(ObjectInputStream in)
throws IOException,
ClassNotFoundException
IOException
ClassNotFoundException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||