|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.xml.utils.StringToIntTable
public class 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 java.lang.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(java.lang.String key)
Tell if the table contains the given string. |
int |
get(java.lang.String key)
Tell if the table contains the given string. |
int |
getIgnoreCase(java.lang.String key)
Tell if the table contains the given string. |
int |
getLength()
Get the length of the list. |
java.lang.String[] |
keys()
Return array of keys in the table. |
void |
put(java.lang.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 java.lang.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(java.lang.String key, int value)
key
- String to appendvalue
- The int value of the stringpublic final int get(java.lang.String key)
key
- String to look for
public final int getIgnoreCase(java.lang.String key)
key
- String to look for
public final boolean contains(java.lang.String key)
key
- String to look for
public final java.lang.String[] keys()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |