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

Constructor Index

 o IntArray()
create with default length
 o IntArray(int)
create with initial buffer length
 o IntArray(int[])
copy initial data from another int[].
 o IntArray(IntArray)
copy initial data from another IntArray (non-null).

Method Index

 o append(int)
append one int element
 o clearData()
clear the array
 o getCount()
get count of used array members.
 o getData()
get data array.
 o setData(int[])
copy data from a int[]
 o setData(int[], int)
copy first n elements of a int[]
 o setData(IntArray)
copy data from another IntArray
 o setSize(int)
set number of used array elements (ensures there is enough storage)

Constructors

 o IntArray
  public IntArray()
create with default length
 o IntArray
  public IntArray(int len)
create with initial buffer length
 o 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
 o 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*

Methods

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