net.pakl.rl
Class ZippedHashMap
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap
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
|
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 |
ZippedHashMap
public ZippedHashMap(int numStates)
ZippedHashMap
public ZippedHashMap()
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