| Modifier and Type | Field and Description |
|---|---|
| private int | m_blocksize
Size of blocks to allocate |
| private int | m_firstFree
Number of strings this contains |
| private String[] | m_map
Array of strings this contains |
| private int | m_mapSize
Size of this table |
| Access | Constructor and Description |
|---|---|
| public | |
| public | StringToStringTable(int
Size of blocks to allocate blocksize)Construct a StringToStringTable, using the given block size. |
| Modifier and Type | Method and Description |
|---|---|
| public final boolean | |
| public final boolean | Returns: True if the given value is in the table.value to look up val)Tell if the table contains the given string. |
| public final String | Returns: The string at the given index.index of the string to look up. i)Get the nth element. |
| public final String | |
| public final String | Returns: the string associated with the given value or null if not foundValue of the string to look up val)Tell if the table contains the given string in the value. |
| public final String | Returns: The value of the string or null if not foundString to look up key)Tell if the table contains the given string. |
| public final int | |
| public final void | |
| public final void |
| m_blocksize | back to summary |
|---|---|
| private int m_blocksize Size of blocks to allocate | |
| m_firstFree | back to summary |
|---|---|
| private int m_firstFree Number of strings this contains | |
| m_map | back to summary |
|---|---|
| private String[] m_map Array of strings this contains | |
| m_mapSize | back to summary |
|---|---|
| private int m_mapSize Size of this table | |
| StringToStringTable | back to summary |
|---|---|
| public StringToStringTable() Default constructor. Note that the default block size is very small, for small lists. | |
| StringToStringTable | back to summary |
|---|---|
| public StringToStringTable(int blocksize) Construct a StringToStringTable, using the given block size.
| |
| contains | back to summary |
|---|---|
| public final boolean contains(String key) Tell if the table contains the given string.
| |
| containsValue | back to summary |
|---|---|
| public final boolean containsValue(String val) Tell if the table contains the given string.
| |
| elementAt | back to summary |
|---|---|
| public final String elementAt(int i) Get the nth element.
| |
| get | back to summary |
|---|---|
| public final String get(String key) Tell if the table contains the given string. | |
| getByValue | back to summary |
|---|---|
| public final String getByValue(String val) Tell if the table contains the given string in the value. | |
| getIgnoreCase | back to summary |
|---|---|
| public final String getIgnoreCase(String key) Tell if the table contains the given string. Ignore case | |
| getLength | back to summary |
|---|---|
| public final int getLength() Get the length of the list.
| |
| put | back to summary |
|---|---|
| public final void put(String key, String value) Append a string onto the vector. The strings go to the even locations in the array and the values in the odd. | |
| remove | back to summary |
|---|---|
| public final void remove(String key) Remove the given string and its value from this table.
| |