|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.xml.utils.StringVector
A very simple table that stores a list of strings, optimized for small lists.
Field Summary | |
protected int |
m_blocksize
|
protected int |
m_firstFree
|
protected String[] |
m_map
|
protected int |
m_mapSize
|
Constructor Summary | |
StringVector()
Default constructor. |
|
StringVector(int blocksize)
Construct a StringVector, using the given block size. |
Method Summary | |
void |
addElement(String value)
Append a string onto the vector. |
boolean |
contains(String s)
Tell if the table contains the given string. |
boolean |
containsIgnoreCase(String s)
Tell if the table contains the given string. |
String |
elementAt(int i)
Get the nth element. |
int |
getLength()
Get the length of the list. |
String |
peek()
Get the string at the tail of this vector without popping. |
String |
pop()
Pop the tail of this vector. |
void |
push(String s)
Tell if the table contains the given string. |
int |
size()
Get the length of the list. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected int m_blocksize
protected String[] m_map
protected int m_firstFree
protected int m_mapSize
Constructor Detail |
public StringVector()
public StringVector(int blocksize)
blocksize
- Size of the blocks to allocateMethod Detail |
public int getLength()
public final int size()
public final void addElement(String value)
value
- Sting to add to the vectorpublic final String elementAt(int i)
i
- Index of string to find
public final boolean contains(String s)
s
- String to look for
public final boolean containsIgnoreCase(String s)
s
- String to find
public final void push(String s)
s
- String to push into the vectorpublic final String pop()
public final String peek()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |