com.threerings.util
Class StreamableHashIntMap<V>

java.lang.Object
  extended by java.util.AbstractMap<Integer,V>
      extended by com.samskivert.util.HashIntMap<V>
          extended by com.threerings.util.StreamableHashIntMap<V>
Type Parameters:
V - the type of value stored in this map.
All Implemented Interfaces:
IntMap<V>, Streamable, Serializable, Cloneable, Map<Integer,V>

public class StreamableHashIntMap<V>
extends HashIntMap<V>
implements Streamable

A HashIntMap extension that can be streamed. The keys and values in the map must also be of streamable types.

See Also:
Streamable, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.samskivert.util.HashIntMap
HashIntMap.IntEntryIterator, HashIntMap.MapEntryIterator, HashIntMap.Record<V>, HashIntMap.RecordIterator<E>
 
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
 
Nested classes/interfaces inherited from interface com.samskivert.util.IntMap
IntMap.IntEntry<V>
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
 
Fields inherited from class com.samskivert.util.HashIntMap
_buckets, _keySet, _loadFactor, _size, DEFAULT_BUCKETS, DEFAULT_LOAD_FACTOR
 
Constructor Summary
StreamableHashIntMap()
          Constructs an empty hash int map with the default number of hash buckets.
StreamableHashIntMap(int buckets, float loadFactor)
          Constructs an empty hash int map with the specified number of hash buckets.
 
Method Summary
 void readObject(ObjectInputStream in)
          Reads our custom streamable fields.
 void writeObject(ObjectOutputStream out)
          Writes our custom streamable fields.
 
Methods inherited from class com.samskivert.util.HashIntMap
checkShrink, clear, clone, containsKey, containsKey, containsValue, createBuckets, elements, ensureCapacity, entrySet, get, get, getImpl, intEntrySet, intKeySet, keys, keySet, keyToIndex, put, put, putAll, remove, remove, removeImpl, resizeBuckets, size
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, isEmpty, putAll, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode, isEmpty, putAll, values
 

Constructor Detail

StreamableHashIntMap

public StreamableHashIntMap(int buckets,
                            float loadFactor)
Constructs an empty hash int map with the specified number of hash buckets.


StreamableHashIntMap

public StreamableHashIntMap()
Constructs an empty hash int map with the default number of hash buckets.

Method Detail

writeObject

public void writeObject(ObjectOutputStream out)
                 throws IOException
Writes our custom streamable fields.

Throws:
IOException

readObject

public void readObject(ObjectInputStream in)
                throws IOException,
                       ClassNotFoundException
Reads our custom streamable fields.

Throws:
IOException
ClassNotFoundException