|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectLinkedList
public class LinkedList
Constructor Summary | |
---|---|
LinkedList()
Creates an empty linked list. |
Method Summary | |
---|---|
boolean |
add(int index,
java.lang.String newData)
Adds data to the given index of the linked list. |
boolean |
delete(int index)
Deletes data from the given index of the linked list. |
java.lang.String |
getData(int index)
Returns the data at the given index. |
void |
printList()
Prints all data in the linked list to the screen, in order, one item per line. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LinkedList()
Method Detail |
---|
public boolean add(int index, java.lang.String newData)
index
- Position at which to add the new data: 0 = headnewData
- Data to add to the linked listpublic boolean delete(int index)
public java.lang.String getData(int index)
index
- Index of data to return
public void printList()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |