public class ArrayListOfData
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
ARRAY_INCREMENT
This constant specifies how much bigger
the array should be made, when the array
is full and has to be made larger.
|
static int |
INITIAL_ARRAY_SIZE
This constant specifies how big the
initial (empty) array should be made
in the constructor
|
Constructor and Description |
---|
ArrayListOfData()
This constructor creates an empty ArrayListOfData.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Data datum)
This function adds the Data object to this ArrayListOfData.
|
int |
getArraySize()
This function returns the size of the array
(so if the array is defined as private Data[] data;
then this function returns data.length).
|
int |
getDataObjectCount()
This function returns the number of Data objects
that are currently in this ArrayList.
|
Iterator |
getIterator()
This function returns an Iterator that can be used
to access the Data elements from this ArrayListOfData.
|
public static final int INITIAL_ARRAY_SIZE
public static final int ARRAY_INCREMENT
public ArrayListOfData()
public int getDataObjectCount()
public int getArraySize()
public void add(Data datum)
datum
- Is the new Data object to be added.public Iterator getIterator()