com.tivoli.twg.libs
Class StringList

java.lang.Object
  extended bycom.tivoli.twg.libs.StringList

public class StringList
extends java.lang.Object

Fast, simple hash table for storing unique strings.


Constructor Summary
StringList()
          Constructor for StringList: initialize empty table
 
Method Summary
 boolean ContainsString(java.lang.String str)
          Test if string is present
 void EmptyList()
          Empty the list
 java.util.Enumeration GetStrings()
          Enumerate all strings in table.
 void InsertString(java.lang.String str)
          Insert new String into the hash table
 java.lang.String RemoveString(java.lang.String str)
          Remove string from table (if present)
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StringList

public StringList()
Constructor for StringList: initialize empty table

Method Detail

EmptyList

public void EmptyList()
Empty the list


InsertString

public void InsertString(java.lang.String str)
Insert new String into the hash table

Parameters:
str - - string to be added

RemoveString

public java.lang.String RemoveString(java.lang.String str)
Remove string from table (if present)

Parameters:
str - - string to be removed
Returns:
string removed, or null if not found

ContainsString

public boolean ContainsString(java.lang.String str)
Test if string is present

Parameters:
str - - string to be checked
Returns:
true if found, else false

GetStrings

public java.util.Enumeration GetStrings()
Enumerate all strings in table.

Returns:
Enumerator containing strings

toString

public java.lang.String toString()