com.isti.trinetwatch.params
Class StaticParamTable

java.lang.Object
  extended bycom.isti.trinetwatch.params.StaticParamTable

public class StaticParamTable
extends java.lang.Object

Class StaticParamTable manages a hash table of 'StaticParameter' objects.


Field Summary
protected  FifoHashtable hTable
           
 
Constructor Summary
StaticParamTable()
           
 
Method Summary
 boolean add(StaticParameter sParam)
          Adds parameter object to hash table.
 boolean containsKey(java.lang.String str)
          Returns true if the specified key exists in the table.
 boolean containsValue(StaticParameter sParam)
          Returns true if the specified parameter object exists in the table.
 java.util.Enumeration elements()
          Returns an enumeration of the parameter objects in the table.
 boolean equals(java.lang.Object obj)
          Compares the given table to this table.
 StaticParameter get(java.lang.String str)
          Returns parameter object associated with the given key.
 StaticParameter remove(java.lang.String str)
          Removes parameter object associated with the given key.
 boolean replaceTableItems(StaticParamTable srcTableObj)
          Replaces all items in this table with the items in the given table (if the given table is not identical).
 int size()
          Returns the number of parameter objects in the table.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

hTable

protected final FifoHashtable hTable
Constructor Detail

StaticParamTable

public StaticParamTable()
Method Detail

add

public boolean add(StaticParameter sParam)
Adds parameter object to hash table.

Returns:
true if successful, false if a parameter with the same name already exists in table or if an invalid parameter is detected.

get

public StaticParameter get(java.lang.String str)
Returns parameter object associated with the given key.

Parameters:
str - a string matching the contents of the 'name' field of the desired parameter object.
Returns:
The handle of the parameter object or null if no matching object was found.

remove

public StaticParameter remove(java.lang.String str)
Removes parameter object associated with the given key.

Parameters:
str - a string matching the contents of the 'name' field of the parameter object to be removed.
Returns:
The handle of the parameter object which was removed or null if no matching object was found.

containsKey

public boolean containsKey(java.lang.String str)
Returns true if the specified key exists in the table.


containsValue

public boolean containsValue(StaticParameter sParam)
Returns true if the specified parameter object exists in the table.


elements

public java.util.Enumeration elements()
Returns an enumeration of the parameter objects in the table.


size

public int size()
Returns the number of parameter objects in the table.


equals

public boolean equals(java.lang.Object obj)
Compares the given table to this table.

Parameters:
obj - 'StaticParamTable' object to compare to.
Returns:
true if the given table is identical to this one; false if not.

replaceTableItems

public boolean replaceTableItems(StaticParamTable srcTableObj)
Replaces all items in this table with the items in the given table (if the given table is not identical).

Parameters:
srcTableObj - source 'StaticParamTable' object to use.
Returns:
true if items in this table were changed; false if not.