|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnachos.kernel.threads.List.ListElement
protected static class List.ListElement
The following class defines a "list element" -- which is used to keep track of one item on a list. It is equivalent to a LISP cell, with a "car" ("item") pointing to the item element on the list, and a "cdr" ("next") pointing to the next item on the list. A "list element" is allocated for each item to be put on the list; it is de-allocated when the item is removed. This means we don't need to keep a "next" pointer in every object we want to put on a list.
Field Summary | |
---|---|
(package private) java.lang.Object |
item
Reference to item on the list. |
(package private) long |
key
Priority, for a sorted list. |
(package private) List.ListElement |
next
The next element on list, null if this is the last. |
Constructor Summary | |
---|---|
List.ListElement(java.lang.Object item,
long sortKey)
Initialize a list element, so it can be added somewhere on a list. |
Method Summary |
---|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
List.ListElement next
long key
java.lang.Object item
Constructor Detail |
---|
public List.ListElement(java.lang.Object item, long sortKey)
item
- The item to be put on the list, it can be any object.sortKey
- The priority of the item, if any.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |