Methods Summary |
---|
public final void | addElement(java.lang.String value)Append a string onto the vector.
if ((m_firstFree + 1) >= m_mapSize)
{
m_mapSize += m_blocksize;
String newMap[] = new String[m_mapSize];
System.arraycopy(m_map, 0, newMap, 0, m_firstFree + 1);
m_map = newMap;
}
m_map[m_firstFree] = value;
m_firstFree++;
|
public final boolean | contains(java.lang.String s)Tell if the table contains the given string.
if (null == s)
return false;
for (int i = 0; i < m_firstFree; i++)
{
if (m_map[i].equals(s))
return true;
}
return false;
|
public final boolean | containsIgnoreCase(java.lang.String s)Tell if the table contains the given string. Ignore case.
if (null == s)
return false;
for (int i = 0; i < m_firstFree; i++)
{
if (m_map[i].equalsIgnoreCase(s))
return true;
}
return false;
|
public final java.lang.String | elementAt(int i)Get the nth element.
return m_map[i];
|
public int | getLength()Get the length of the list.
return m_firstFree;
|
public final java.lang.String | peek()Get the string at the tail of this vector without popping.
return (m_firstFree <= 0) ? null : m_map[m_firstFree - 1];
|
public final java.lang.String | pop()Pop the tail of this vector.
if (m_firstFree <= 0)
return null;
m_firstFree--;
String s = m_map[m_firstFree];
m_map[m_firstFree] = null;
return s;
|
public final void | push(java.lang.String s)Tell if the table contains the given string.
if ((m_firstFree + 1) >= m_mapSize)
{
m_mapSize += m_blocksize;
String newMap[] = new String[m_mapSize];
System.arraycopy(m_map, 0, newMap, 0, m_firstFree + 1);
m_map = newMap;
}
m_map[m_firstFree] = s;
m_firstFree++;
|
public final int | size()Get the length of the list.
return m_firstFree;
|