|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jds.collection.LinkedList
LinkedList - collection based on a sequence of linked values; for use with book Classic Data Structures in Java by Timothy A Budd, published by Addison-Wesley, 2001.
Collection
, Serialized FormConstructor Summary | |
LinkedList()
initialize newly created list |
Method Summary | |
void |
addElement(java.lang.Object newValue)
add a new value to the collection |
void |
addFirst(java.lang.Object newValue)
add a new value to front of the collection |
void |
addLast(java.lang.Object newValue)
add a new value to end of the collection |
boolean |
containsElement(java.lang.Object test)
see if collection contains value |
java.util.Enumeration |
elements()
Yields enumerator for collection |
java.lang.Object |
findElement(java.lang.Object test)
find element that will test equal to value |
java.lang.Object |
getFirst()
access the first value in collection |
java.lang.Object |
getLast()
access the last value in collection |
boolean |
isEmpty()
Determines whether the collection is empty |
void |
removeElement(java.lang.Object newValue)
remove a new value from the collection |
void |
removeFirst()
remove first value in collection |
void |
removeLast()
remove last value in collection |
int |
size()
Determines number of elements in collection |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public LinkedList()
Method Detail |
public boolean isEmpty()
public int size()
public java.util.Enumeration elements()
Enumeration
that will yield the elements of the collectionEnumeration
public void addFirst(java.lang.Object newValue)
value
- element to be inserted into collectionpublic void addLast(java.lang.Object newValue)
value
- element to be inserted into collectionpublic java.lang.Object getFirst()
public void removeFirst()
public java.lang.Object getLast()
public void removeLast()
public void addElement(java.lang.Object newValue)
newValue
- element to be inserted into collectionpublic boolean containsElement(java.lang.Object test)
test
- element to be testedpublic java.lang.Object findElement(java.lang.Object test)
value
- element to be testedequals
to argumentpublic void removeElement(java.lang.Object newValue)
value
- element to be removed from collection
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |