|
|||||||||
| Home >> All >> org >> apache >> xml >> [ utils overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.xml.utils
Class StringToIntTable

java.lang.Objectorg.apache.xml.utils.StringToIntTable
- public class StringToIntTable
- extends java.lang.Object
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 |
INVALID_KEY
public static final int INVALID_KEY
- See Also:
- Constant Field Values
m_blocksize
private int m_blocksize
- Block size to allocate
m_map
private java.lang.String[] m_map
- Array of strings this table points to. Associated with ints
in m_values
m_values
private int[] m_values
- Array of ints this table points. Associated with strings from
m_map.
m_firstFree
private int m_firstFree
- Number of ints in the table
m_mapSize
private int m_mapSize
- Size of this table
| Constructor Detail |
StringToIntTable
public StringToIntTable()
- Default constructor. Note that the default
block size is very small, for small lists.
StringToIntTable
public StringToIntTable(int blocksize)
- Construct a StringToIntTable, using the given block size.
| Method Detail |
getLength
public final int getLength()
- Get the length of the list.
put
public final void put(java.lang.String key, int value)
- Append a string onto the vector.
get
public final int get(java.lang.String key)
- Tell if the table contains the given string.
getIgnoreCase
public final int getIgnoreCase(java.lang.String key)
- Tell if the table contains the given string. Ignore case.
contains
public final boolean contains(java.lang.String key)
- Tell if the table contains the given string.
keys
public final java.lang.String[] keys()
- Return array of keys in the table.
|
|||||||||
| Home >> All >> org >> apache >> xml >> [ utils overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.apache.xml.utils.StringToIntTable