|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectkoala.dynamicjava.interpreter.context.VariableContext.Scope
A table which maps a string with an object
Nested Class Summary | |
protected static class |
VariableContext.Scope.Entry
To manage collisions |
protected static class |
VariableContext.Scope.EntryFactory
To create an entry |
Field Summary | |
protected int |
count
The number of entries |
protected static int |
INITIAL_CAPACITY
The initial capacity |
protected static float |
LOAD_FACTOR
The load factor |
protected static java.lang.Object |
NO_SUCH_KEY
The object used to notify that a key do not exists |
protected VariableContext.Scope.Entry[] |
table
The underlying array |
protected int |
threshold
The resizing threshold |
Constructor Summary | |
VariableContext.Scope()
Creates a new scope |
Method Summary | |
void |
clear()
Clears this scope |
java.lang.Object |
get(java.lang.String key)
Gets the value of a variable |
java.util.Set |
keySet()
Returns a set that contains the keys |
java.lang.Object |
put(java.lang.String key,
java.lang.Object value)
Sets a new value for the given variable |
protected void |
rehash()
Rehash the table |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final float LOAD_FACTOR
protected static final int INITIAL_CAPACITY
protected static final java.lang.Object NO_SUCH_KEY
protected VariableContext.Scope.Entry[] table
protected int count
protected int threshold
Constructor Detail |
public VariableContext.Scope()
Method Detail |
public java.lang.Object get(java.lang.String key)
public java.lang.Object put(java.lang.String key, java.lang.Object value)
public java.util.Set keySet()
public void clear()
protected void rehash()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |