net.pakl.rl
Class ZippedHashMap

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap
          extended by net.pakl.rl.ZippedHashMap
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map

public class ZippedHashMap
extends java.util.HashMap

A custom HashMap class that zips all objects that fall into a particular row of the HashMap (Hash together, get zipped together.) The hope was that this would save a significant amount of memory and allow larger simulations to be run... but it wasn't enough.

See Also:
Serialized Form

Constructor Summary
ZippedHashMap()
           
ZippedHashMap(int numStates)
           
 
Method Summary
 java.lang.Object get(java.lang.Object key)
           
static void main(java.lang.String[] args)
           
 java.lang.Object put(java.lang.Object key, java.lang.Object value)
           
 void test()
           
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, isEmpty, keySet, 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

ZippedHashMap

public ZippedHashMap(int numStates)

ZippedHashMap

public ZippedHashMap()
Method Detail

put

public java.lang.Object put(java.lang.Object key,
                            java.lang.Object value)
Specified by:
put in interface java.util.Map
Overrides:
put in class java.util.HashMap

get

public java.lang.Object get(java.lang.Object key)
Specified by:
get in interface java.util.Map
Overrides:
get in class java.util.HashMap

test

public void test()

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception