Methods Summary |
---|
public synchronized void | WriteOut(java.io.DataOutputStream dos)Purpose: Writes this object to DataOutputStream
Enumeration enum = elements();
try{
for(;enum.hasMoreElements();){
String str = (String)(enum.nextElement());
dos.writeBytes(str);
dos.writeByte('\n");
}
}
catch(IOException e){System.out.println("IO error in StringArray WriteOut"); }
|
public synchronized void | WriteOut()purpose: Writes this object to stdio //to stdio
Enumeration enum = elements();
for(;enum.hasMoreElements();){
String str = (String)(enum.nextElement());
System.out.println(str);
}
|
public synchronized void | addElement(java.lang.String obj)Purpose: adds an element to the array
m_Vector.addElement(obj);
|
public synchronized void | appendToLastString(java.lang.String strToAppend)Purpose: appends strToAppend to the last String added to the array
if no string were added works like addElement()
if(size() <= 0)
addElement(strToAppend);
else{
String str = new String (elementAt(size()-1));
str += strToAppend;
setElementAt(str, m_Vector.size()-1);
}
|
public synchronized java.lang.Object | clone()Purpose: clones the array
return m_Vector.clone();
|
public boolean | contains(java.lang.String elem)Purpose: searches the array for a given String
return m_Vector.contains((Object) elem);
|
protected synchronized void | copyInto(java.lang.String[] strArray)Purpose: Copies this object into a given strArray[]
strArray = new String[size()];
for(int i = 0; i < size(); i++)
strArray[i] = elementAt(i);
|
public java.lang.String | elementAt(int iIndex)Purpose: Returns the String at a given index
return (String) m_Vector.elementAt(iIndex);
|
public synchronized java.util.Enumeration | elements()Purpose: Returns the enumeration object for this object
return m_Vector.elements();
|
public synchronized boolean | removeElement(java.lang.String obj)Purpose: Removes the specified element
return m_Vector.removeElement((Object) obj);
|
public void | setElementAt(java.lang.String obj, int iIndex)Purpose: sets an element of the array at a given index to a given value
m_Vector.setElementAt((Object) obj, iIndex);
|
public int | size()Purpose: Returns the size for the array return m_Vector.size();
|
public synchronized java.lang.String | toString()Purpose: Converts this object to a String
return m_Vector.toString();
|