public class StringVector extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
protected int |
m_blocksize |
protected int |
m_firstFree |
protected String[] |
m_map |
protected int |
m_mapSize |
Constructor and Description |
---|
StringVector()
Default constructor.
|
StringVector(int blocksize)
Construct a StringVector, using the given block size.
|
Modifier and Type | Method and Description |
---|---|
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.
|
protected int m_blocksize
protected String[] m_map
protected int m_firstFree
protected int m_mapSize
public StringVector()
public StringVector(int blocksize)
blocksize
- Size of the blocks to allocatepublic 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 findpublic final boolean contains(String s)
s
- String to look forpublic final boolean containsIgnoreCase(String s)
s
- String to findpublic final void push(String s)
s
- String to push into the vectorpublic final String pop()
public final String peek()
Copyright © 2016 JBoss by Red Hat. All rights reserved.