|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectastex.StringArray
public class StringArray
An object that implements a dynamic array. The array grows as necessary as objects are added to it. Array copying is currently performed by explicit loops rather than using System.arraycopy.
| Constructor Summary | |
|---|---|
StringArray()
Default constructor. |
|
StringArray(int initialSize)
Constructor which specifies the initial size. |
|
StringArray(int initialSize,
int increment)
Constructor which specifies the initial size and the capacity increment. |
|
| Method Summary | |
|---|---|
int |
add(java.lang.String object)
Add an entry to the CLASSNAME. |
boolean |
contains(java.lang.String object)
Does the array contain the specified object. |
java.lang.String |
get(int index)
Return a specified element from the array. |
java.lang.String[] |
getArray()
Return the reference to the object array. |
int |
getIndex(java.lang.String object)
Return the location of the object or -1 if its not present. |
java.lang.String |
getReverse(int index)
Return a specified element from the array end of the array. |
static void |
print(java.lang.String message,
StringArray array)
Print a CLASSNAME contents. |
void |
remove(java.lang.String object)
Remove an object from the CLASSNAME. |
void |
removeAllElements()
Remove all elements from the dynamic array. |
void |
removeElement(int element)
Remove a specified element from the CLASSNAME. |
void |
set(int index,
java.lang.String val)
Set a specified element in the array. |
void |
setCapacity(int count)
Set the capacity for the object. |
int |
size()
Return the number of objects in the object array. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StringArray(int initialSize,
int increment)
public StringArray()
public StringArray(int initialSize)
| Method Detail |
|---|
public void setCapacity(int count)
public int add(java.lang.String object)
public void remove(java.lang.String object)
public void removeElement(int element)
public void removeAllElements()
public java.lang.String get(int index)
public java.lang.String getReverse(int index)
public void set(int index,
java.lang.String val)
public java.lang.String[] getArray()
public boolean contains(java.lang.String object)
public int getIndex(java.lang.String object)
public int size()
public static void print(java.lang.String message,
StringArray array)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||