|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.xml.utils.StringToIntTable
A very simple lookup table that stores a list of strings, the even number strings being keys, and the odd number strings being values.
Field Summary | |
static int |
INVALID_KEY
|
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. |
Constructor Summary | |
StringToIntTable()
Default constructor. |
|
StringToIntTable(int blocksize)
Construct a StringToIntTable, using the given block size. |
Method Summary | |
boolean |
contains(String key)
Tell if the table contains the given string. |
int |
get(String key)
Tell if the table contains the given string. |
int |
getIgnoreCase(String key)
Tell if the table contains the given string. |
int |
getLength()
Get the length of the list. |
String[] |
keys()
Return array of keys in the table. |
void |
put(String key,
int value)
Append a string onto the vector. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int INVALID_KEY
private int m_blocksize
private String[] m_map
private int[] m_values
private int m_firstFree
private int m_mapSize
Constructor Detail |
public StringToIntTable()
public StringToIntTable(int blocksize)
blocksize
- Size of block to allocateMethod Detail |
public final int getLength()
public final void put(String key, int value)
key
- String to appendvalue
- The int value of the stringpublic final int get(String key)
key
- String to look for
public final int getIgnoreCase(String key)
key
- String to look for
public final boolean contains(String key)
key
- String to look for
public final String[] keys()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |