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() IntArray()
-  create with default length
  
-   IntArray(int) IntArray(int)
-  create with initial buffer length
  
-   IntArray(int[]) IntArray(int[])
-  copy initial data from another int[].
  
-   IntArray(IntArray) IntArray(IntArray)
-  copy initial data from another IntArray (non-null).
   
  -   append(int) append(int)
-  append one int element
  
-   clearData() clearData()
-  clear the array
  
-   getCount() getCount()
-  get count of used array members.
  
-   getData() getData()
-  get data array.
  
-   setData(int[]) setData(int[])
-  copy data from a int[]
  
-   setData(int[], int) setData(int[], int)
-  copy first n elements of a int[]
  
-   setData(IntArray) setData(IntArray)
-  copy data from another IntArray
  
-   setSize(int) setSize(int)
-  set number of used array elements (ensures there is enough storage)
   
 IntArray
IntArray
  public IntArray()
  -  create with default length
 IntArray
IntArray
  public IntArray(int len)
  -  create with initial buffer length
 IntArray
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
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
setData
  public void setData(IntArray dat)
  -  copy data from another IntArray
 setData
setData
  public void setData(int dat[])
  -  copy data from a int[]
 setData
setData
  public synchronized void setData(int dat[],
                                   int n)
  -  copy first n elements of a int[]
 getCount
getCount
  public final synchronized int getCount()
  -  get count of used array members.
Note: may be smaller than data_.length
 getData
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
append
  public synchronized void append(int d)
  -  append one int element
 setSize
setSize
  public synchronized void setSize(int n)
  -  set number of used array elements (ensures there is enough storage)
 clearData
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