Class iicm.vrml.pwutils.FloatArray
All Packages  Class Hierarchy  This Package  Previous  Next  Index
  Class iicm.vrml.pwutils.FloatArray
java.lang.Object
   |
   +----iicm.vrml.pwutils.FloatArray
  -  public class FloatArray
  -  extends Object
FloatArray - dynamic array of float type values
better time and memory efficiency than Vector,
float[] accessible in native code
Copyright (c) 1996 IICM
   
  -   FloatArray() FloatArray()
-  create with default length
  
-   FloatArray(float[]) FloatArray(float[])
-  copy initial data from another float[].
  
-   FloatArray(FloatArray) FloatArray(FloatArray)
-  copy initial data from another FloatArray (non-null).
  
-   FloatArray(int) FloatArray(int)
-  create with initial buffer length
   
  -   append(float) append(float)
-  append one float element
  
-   clearData() clearData()
-  clear the array
  
-   getCount() getCount()
-  get count of used array members.
  
-   getData() getData()
-  get data array.
  
-   setData(float[]) setData(float[])
-  copy data from a float[]
  
-   setData(float[], int) setData(float[], int)
-  copy first n elements of a float[]
  
-   setData(FloatArray) setData(FloatArray)
-  copy data from another FloatArray
  
-   setSize(int) setSize(int)
-  set number of used array elements (ensures there is enough storage)
   
 FloatArray
FloatArray
  public FloatArray()
  -  create with default length
 FloatArray
FloatArray
  public FloatArray(int len)
  -  create with initial buffer length
 FloatArray
FloatArray
  public FloatArray(float dat[])
  -  copy initial data from another float[]. To say it again:
values in float[] are *copied* and not just referenced by this class
 FloatArray
FloatArray
  public FloatArray(FloatArray dat)
  -  copy initial data from another FloatArray (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(FloatArray dat)
  -  copy data from another FloatArray
 setData
setData
  public void setData(float dat[])
  -  copy data from a float[]
 setData
setData
  public synchronized void setData(float dat[],
                                   int n)
  -  copy first n elements of a float[]
 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 float[] 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(float d)
  -  append one float 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