|
Xj3D 2.0 VRML/X3D Code API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.web3d.vrml.util.NodeArray
public class NodeArray
Simple dynamic array structure that holds VRMLNode instances.
Idea is to save implementation weight when we don't really want to use a full java.util collections class, but don't want to have to re-implement the node copy/paste stuff every time.
| Constructor Summary | |
|---|---|
NodeArray()
Create a new default array with size 512 items |
|
NodeArray(int initialSize)
Create an array with the given initial size |
|
| Method Summary | |
|---|---|
void |
add(NodeArray nodeList)
Add the contents of the given array to this array. |
void |
add(VRMLNode newNode)
Add a new value to the array. |
void |
add(VRMLNode[] values)
Add an array of values in bulk to the array. |
void |
add(VRMLNode[] values,
int offset,
int len)
Add an subset of the array of values in bulk to the array. |
void |
clear()
Clear the array so that it contains no values |
VRMLNode |
get(int index)
Get the value at the given index. |
int |
indexOf(VRMLNode node)
Find the index of the given node in this list. |
VRMLNode |
remove(int index)
Remove the value at the given index. |
void |
remove(NodeArray nodeList)
Convenience method to remove the array of values given from this array. |
VRMLNode |
remove(VRMLNode object)
Remove the given value from the array. |
void |
set(int index,
VRMLNode value)
Set the value at the given index. |
void |
set(NodeArray list)
Replace the contents of this list to the values in the given list. |
int |
size()
Get the count of the number of items in the array. |
VRMLNode[] |
toArray()
Turn the values of this array into a real array. |
VRMLNode[] |
toArray(VRMLNode[] values)
Turn the values of this array into a real array by copying them into 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 NodeArray()
public NodeArray(int initialSize)
initialSize - The size to start with| Method Detail |
|---|
public int size()
public void clear()
public void add(VRMLNode newNode)
newNode - the value to be addedpublic void add(VRMLNode[] values)
values - The values to be addedpublic void add(NodeArray nodeList)
nodeList - The values to be added
public void add(VRMLNode[] values,
int offset,
int len)
values - The values to be addedoffset - The offset into the array to copy overlen - The number of items to copypublic VRMLNode get(int index)
index - The position to get values from
java.lang.IndexOutOfBoundsException - The index was not legal
public void set(int index,
VRMLNode value)
index - The position to get values fromvalue - The new value to set
java.lang.IndexOutOfBoundsException - The index was not legalpublic void set(NodeArray list)
list - The list to copy values frompublic VRMLNode remove(int index)
index - The position to remove the value from
java.lang.IndexOutOfBoundsException - The index was not legalpublic VRMLNode remove(VRMLNode object)
object - The value to remove
java.lang.IndexOutOfBoundsException - The index was not legalpublic int indexOf(VRMLNode node)
node - The node instance to look for
public void remove(NodeArray nodeList)
nodeList - The list of objects to removepublic VRMLNode[] toArray()
public VRMLNode[] toArray(VRMLNode[] values)
values - The array to copy values to
|
Xj3D 2.0 VRML/X3D Code API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||