org.onemind.commons.java.datastructure
Interface Nametable

All Known Implementing Classes:
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

public 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

public 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

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

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

access

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

Parameters:
name -
Returns:

undeclare

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

Parameters:
name -

asMap

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

Returns:
unmodifiable map representation of this nametable


Copyright © 2004-2006 . All Rights Reserved.