|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.onemind.commons.java.datastructure.SimpleNametable
A simple implementation of nametable
Constructor Summary | |
SimpleNametable(java.util.Map m)
Constructor |
Method Summary | |
java.lang.Object |
access(java.lang.String name)
Access the value associated with name |
java.util.Map |
asMap()
Return the name table as a map |
java.lang.Object |
assign(java.lang.String name,
java.lang.Object value)
Assign a variable in the name table |
boolean |
containsName(java.lang.String name)
Whether the nametable contains the name |
void |
declare(java.lang.String name,
java.lang.Object value)
Declare a variable in the name table |
java.lang.String |
toString()
|
void |
undeclare(java.lang.String name)
Undeclare the name |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public SimpleNametable(java.util.Map m)
m
- the nameMethod Detail |
public void declare(java.lang.String name, java.lang.Object value)
declare
in interface Nametable
name
- the namevalue
- the valuepublic java.lang.Object assign(java.lang.String name, java.lang.Object value)
assign
in interface Nametable
name
- the namevalue
- the value
public boolean containsName(java.lang.String name)
containsName
in interface Nametable
name
- the name
public java.lang.Object access(java.lang.String name)
access
in interface Nametable
name
-
public void undeclare(java.lang.String name)
undeclare
in interface Nametable
name
- public java.lang.String toString()
public java.util.Map asMap()
asMap
in interface Nametable
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |