public class LinkedListOfData
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
LinkedListOfData.Node
This inner class defines a single Node within the
Linked-List.
|
Constructor and Description |
---|
LinkedListOfData()
This constructor creates an empty LinkedListOfData.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Data datum)
This function adds the Data object to this LinkedListOfData
at the head of the list.
|
int |
getDataObjectCount()
This function returns the number of Data objects
that are currently in this Linked-List.
|
Iterator |
getIterator()
This function returns an Iterator that can be used
to access the Data elements from this LinkedListOfData.
|
Data |
removeHead()
This function removes the Node that is at the head
of the Linked-List.
|
public LinkedListOfData()
public int getDataObjectCount()
public void add(Data datum)
datum
- Is the new Data object to be added.public Data removeHead()
public Iterator getIterator()