|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectintroExam.LinkedList.LL
A minimal LL
class using a nested
LLNode
class, for the 15-111/200
Final Exam/Fall 2004
Students are not permitted to modify or augment this class in any way. This file must not change.
Note that all instance variables declared in the
nested LLNode
class are public
and that value
is also declared with
the final
access modifier.
Thus, the information that they store can be accessed
through these names directly, or through the provided
getters/setters (except value
cannot be
changed once it has been initialized, and it has no
setter).
Nested Class Summary | |
protected class |
LL.LLNode
|
Field Summary | |
protected LL.LLNode |
head
|
Constructor Summary | |
LL()
Default constructor: creates empty list |
Method Summary | |
void |
addFirst(java.lang.Comparable value)
Inserts a value at the beginning of the list. |
java.lang.String |
toString()
Returns a string representation of the list |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected LL.LLNode head
Constructor Detail |
public LL()
Method Detail |
public void addFirst(java.lang.Comparable value)
value
- to be added as the head of the listpublic java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |