|
Xj3D VRML/X3D Code API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.web3d.util.StringArray
Simple dynamic array structure that holds String primitives.
| Constructor Summary | |
StringArray()
Create a new default array with size 512 items and increment size of 256. |
|
StringArray(int initialSize)
Create an array with the given initial size. |
|
StringArray(int initialSize,
int inc)
Create an array with the given initial size and resize strategy. |
|
| Method Summary | |
void |
add(java.lang.String newString)
Add a new value to the array. |
void |
add(java.lang.String[] values)
Add an array of values in bulk to the array. |
void |
clear()
Clear the array so that it contains no values |
java.lang.String |
get(int index)
Get the value at the given index. |
java.lang.String |
remove(int index)
Remove the value at the given index. |
void |
set(int index,
java.lang.String value)
Set the value at the given index. |
int |
size()
Get the count of the number of items in the array. |
java.lang.String[] |
toArray()
Turn the values of this array into a real array. |
java.lang.String[] |
toArray(java.lang.String[] values)
Turn the values of this array into a real array by copying them Stringo the given array if possible. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public StringArray()
public StringArray(int initialSize)
initialSize - The size to start with
public StringArray(int initialSize,
int inc)
initialSize - The size to start withinc - The amount to increment each resize with| Method Detail |
public int size()
public void clear()
public void add(java.lang.String newString)
newString - the value to be addedpublic void add(java.lang.String[] values)
values - The values to be addedpublic java.lang.String get(int index)
index - The position to get values from
java.lang.IndexOutOfBoundsException - The index was not legal
public void set(int index,
java.lang.String value)
index - The position to get values fromvalue - The new value to set
java.lang.IndexOutOfBoundsException - The index was not legalpublic java.lang.String remove(int index)
index - The position to remove the value from
java.lang.IndexOutOfBoundsException - The index was not legalpublic java.lang.String[] toArray()
public java.lang.String[] toArray(java.lang.String[] values)
values - The array to copy values to
|
Xj3D VRML/X3D Code API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||