| java.lang.Object org.apache.xml.serializer.utils.StringToIntTable
StringToIntTable | final public class StringToIntTable (Code) | | A very simple lookup table that stores a list of strings, the even
number strings being keys, and the odd number strings being values.
This class is a copy of the one in org.apache.xml.utils.
It exists to cut the serializers dependancy on that package.
This class is not a public API, it is only public so it can be used
in org.apache.xml.serializer.
|
Constructor Summary | |
public | StringToIntTable() Default constructor. | public | StringToIntTable(int blocksize) Construct a StringToIntTable, using the given block size. |
Method Summary | |
final public boolean | contains(String key) Tell if the table contains the given string. | final public int | get(String key) Tell if the table contains the given string. | final public int | getIgnoreCase(String key) Tell if the table contains the given string. | final public int | getLength() Get the length of the list. | final public String[] | keys() Return array of keys in the table. | final public void | put(String key, int value) Append a string onto the vector. |
INVALID_KEY | final public static int INVALID_KEY(Code) | | |
StringToIntTable | public StringToIntTable()(Code) | | Default constructor. Note that the default
block size is very small, for small lists.
|
StringToIntTable | public StringToIntTable(int blocksize)(Code) | | Construct a StringToIntTable, using the given block size.
Parameters: blocksize - Size of block to allocate |
contains | final public boolean contains(String key)(Code) | | Tell if the table contains the given string.
Parameters: key - String to look for True if the string is in the table |
get | final public int get(String key)(Code) | | Tell if the table contains the given string.
Parameters: key - String to look for The String's int value |
getIgnoreCase | final public int getIgnoreCase(String key)(Code) | | Tell if the table contains the given string. Ignore case.
Parameters: key - String to look for The string's int value |
getLength | final public int getLength()(Code) | | Get the length of the list.
the length of the list |
keys | final public String[] keys()(Code) | | Return array of keys in the table.
Array of strings |
put | final public void put(String key, int value)(Code) | | Append a string onto the vector.
Parameters: key - String to append Parameters: value - The int value of the string |
|
|