org.onemind.commons.java.datastructure
Interface Nametable

All Known Implementing Classes:
NametableStack.LocalNametable, SimpleNametable

public interface Nametable

A name table interface

Author:
TiongHiang Lee (thlee@onemindsoft.org)

Method Summary
 java.lang.Object access(java.lang.String name)
          Access the value associated with name
 java.util.Map asMap()
          Return map representation of this nametable
 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
 void undeclare(java.lang.String name)
          Undeclare the name
 

Method Detail

declare

void declare(java.lang.String name,
             java.lang.Object value)
Declare a variable in the name table

Parameters:
name - the name
value - the value

assign

java.lang.Object assign(java.lang.String name,
                        java.lang.Object value)
Assign a variable in the name table

Parameters:
name - the name
value - the value
Returns:
the old value, or null

containsName

boolean containsName(java.lang.String name)
Whether the nametable contains the name

Parameters:
name - the name
Returns:
true if contains the name

access

java.lang.Object access(java.lang.String name)
Access the value associated with name

Parameters:
name -
Returns:

undeclare

void undeclare(java.lang.String name)
Undeclare the name

Parameters:
name -

asMap

java.util.Map asMap()
Return map representation of this nametable

Returns:
unmodifiable map representation of this nametable