gnu.mapping
Class Table2D
java.lang.Object
gnu.mapping.Table2D
public class Table2D
- extends java.lang.Object
Maps 2 objects to another.
Uses a weak references to each key, unless it is null or a Symbol.
This should at some point be merged with SimpleEnvironment. FIXME.
Method Summary |
java.lang.Object |
get(java.lang.Object key1,
java.lang.Object key2,
java.lang.Object defaultValue)
|
static Table2D |
getInstance()
|
boolean |
isBound(java.lang.Object key1,
java.lang.Object key2)
|
protected gnu.mapping.Entry |
lookup(java.lang.Object key1,
java.lang.Object key2,
int hash1,
int hash2,
boolean create)
|
java.lang.Object |
put(java.lang.Object key1,
java.lang.Object key2,
java.lang.Object newValue)
|
java.lang.Object |
remove(java.lang.Object key1,
java.lang.Object key2)
|
java.lang.Object |
remove(java.lang.Object key1,
java.lang.Object key2,
int hash)
|
java.lang.Object |
remove(java.lang.Object key1,
java.lang.Object key2,
int hash1,
int hash2)
|
protected java.lang.Object |
wrapReference(java.lang.Object key)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Table2D
public Table2D()
Table2D
public Table2D(int capacity)
getInstance
public static final Table2D getInstance()
get
public java.lang.Object get(java.lang.Object key1,
java.lang.Object key2,
java.lang.Object defaultValue)
isBound
public boolean isBound(java.lang.Object key1,
java.lang.Object key2)
put
public java.lang.Object put(java.lang.Object key1,
java.lang.Object key2,
java.lang.Object newValue)
remove
public java.lang.Object remove(java.lang.Object key1,
java.lang.Object key2)
remove
public java.lang.Object remove(java.lang.Object key1,
java.lang.Object key2,
int hash)
remove
public java.lang.Object remove(java.lang.Object key1,
java.lang.Object key2,
int hash1,
int hash2)
lookup
protected gnu.mapping.Entry lookup(java.lang.Object key1,
java.lang.Object key2,
int hash1,
int hash2,
boolean create)
wrapReference
protected java.lang.Object wrapReference(java.lang.Object key)