|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectiicm.vrml.pwutils.IntArray
public class IntArray
IntArray - dynamic array of int type values better time and memory efficiency than Vector, int[] accessible in native code Copyright (c) 1996 IICM
Field Summary | |
---|---|
private int |
count_
|
private int[] |
data_
|
Constructor Summary | |
---|---|
IntArray()
create with default length |
|
IntArray(int len)
create with initial buffer length |
|
IntArray(int[] dat)
copy initial data from another int[]. |
|
IntArray(IntArray dat)
copy initial data from another IntArray (non-null). |
Method Summary | |
---|---|
void |
append(int d)
append one int element |
boolean |
clearData()
clear the array |
private void |
enlarge(int newsize)
enlarge the data array to its new size; does not change count_ |
int |
getCount()
get count of used array members. |
int[] |
getData()
get data array. |
void |
setData(int[] dat)
copy data from a int[] |
void |
setData(int[] dat,
int n)
copy first n elements of a int[] |
void |
setData(IntArray dat)
copy data from another IntArray |
void |
setSize(int n)
set number of used array elements (ensures there is enough storage) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private int[] data_
private int count_
Constructor Detail |
---|
public IntArray()
public IntArray(int len)
public IntArray(int[] dat)
public IntArray(IntArray dat)
Method Detail |
---|
public void setData(IntArray dat)
public void setData(int[] dat)
public void setData(int[] dat, int n)
public final int getCount()
public final int[] getData()
public void append(int d)
public void setSize(int n)
public boolean clearData()
private void enlarge(int newsize)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |