Class iicm.vrml.pwutils.IntArray
All Packages Class Hierarchy This Package Previous Next Index
Class iicm.vrml.pwutils.IntArray
java.lang.Object
|
+----iicm.vrml.pwutils.IntArray
- public class IntArray
- extends Object
IntArray - dynamic array of int type values
better time and memory efficiency than Vector,
int[] accessible in native code
Copyright (c) 1996 IICM
-
IntArray()
- create with default length
-
IntArray(int)
- create with initial buffer length
-
IntArray(int[])
- copy initial data from another int[].
-
IntArray(IntArray)
- copy initial data from another IntArray (non-null).
-
append(int)
- append one int element
-
clearData()
- clear the array
-
getCount()
- get count of used array members.
-
getData()
- get data array.
-
setData(int[])
- copy data from a int[]
-
setData(int[], int)
- copy first n elements of a int[]
-
setData(IntArray)
- copy data from another IntArray
-
setSize(int)
- set number of used array elements (ensures there is enough storage)
IntArray
public IntArray()
- create with default length
IntArray
public IntArray(int len)
- create with initial buffer length
IntArray
public IntArray(int dat[])
- copy initial data from another int[]. To say it again:
values in int[] are *copied* and not just referenced by this class
IntArray
public IntArray(IntArray dat)
- copy initial data from another IntArray (non-null).
do not use the above constructor in this case, as it would use all values,
not just the used length (count); again: values are *copied*
setData
public void setData(IntArray dat)
- copy data from another IntArray
setData
public void setData(int dat[])
- copy data from a int[]
setData
public synchronized void setData(int dat[],
int n)
- copy first n elements of a int[]
getCount
public final synchronized int getCount()
- get count of used array members.
Note: may be smaller than data_.length
getData
public final synchronized int[] getData()
- get data array. Only elements 0 to (getCount () - 1) were set by user.
Subsequent calls (after enlargement) may return a different array object
append
public synchronized void append(int d)
- append one int element
setSize
public synchronized void setSize(int n)
- set number of used array elements (ensures there is enough storage)
clearData
public synchronized boolean clearData()
- clear the array
- Returns:
- true if the array was previously non-empty
All Packages Class Hierarchy This Package Previous Next Index