Modifier and Type | Field and Description |
---|---|
public static final int | |
private int | m_blocksize
Block size to allocate |
private int | m_firstFree
Number of ints in the table |
private String[] | m_map
Array of strings this table points to. |
private int | m_mapSize
Size of this table |
private int[] | m_values
Array of ints this table points. |
Access | Constructor and Description |
---|---|
public | |
public | StringToIntTable(int
Size of block to allocate blocksize)Construct a StringToIntTable, using the given block size. |
Modifier and Type | Method and Description |
---|---|
public final boolean | |
public final int | |
public final int | Returns: The string's int valueString to look for key)Tell if the table contains the given string. |
public final int | |
public final String[] | |
public final void |
INVALID_KEY | back to summary |
---|---|
public static final int INVALID_KEY |
m_blocksize | back to summary |
---|---|
private int m_blocksize Block size to allocate |
m_firstFree | back to summary |
---|---|
private int m_firstFree Number of ints in the table |
m_map | back to summary |
---|---|
private String[] m_map Array of strings this table points to. Associated with ints in m_values |
m_mapSize | back to summary |
---|---|
private int m_mapSize Size of this table |
m_values | back to summary |
---|---|
private int[] m_values Array of ints this table points. Associated with strings from m_map. |
StringToIntTable | back to summary |
---|---|
public StringToIntTable() Default constructor. Note that the default block size is very small, for small lists. |
StringToIntTable | back to summary |
---|---|
public StringToIntTable(int blocksize) Construct a StringToIntTable, using the given block size.
|
contains | back to summary |
---|---|
public final boolean contains(String key) Tell if the table contains the given string.
|
get | back to summary |
---|---|
public final int get(String key) Tell if the table contains the given string.
|
getIgnoreCase | back to summary |
---|---|
public final int 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.
|
keys | back to summary |
---|---|
public final String[] keys() Return array of keys in the table.
|
put | back to summary |
---|---|
public final void put(String key, int value) Append a string onto the vector.
|