edu.utah.janosvm.sys
Class List
java.lang.Object
|
+--edu.utah.janosvm.sys.List
- Direct Known Subclasses:
- EventQueue
- public class List
- extends java.lang.Object
Root for a doubly linked list.
- Author:
- Tim Stack, Utah Janos Team
- See Also:
ListNode
Constructor Summary |
List()
Construct an empty list object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait, wait0 |
head
public ListNode head
- The header for the list.
tail
public ListNode tail
- The tail node for the list.
List
public List()
- Construct an empty list object.
count
public int count()
- Returns:
- The number of nodes in the list.
addHead
public void addHead(ListNode ln)
- Add a node to the head of the list.
- Parameters:
ln
- The node to add.
addTail
public void addTail(ListNode ln)
- Add a node to the tail of the list.
- Parameters:
ln
- The node to add.
remHead
public ListNode remHead()
- Remove and return the node at the head of the list, or null if its
empty.
- Returns:
- The node to removed.
remTail
public ListNode remTail()
- Remove and return the node at the tail of the list, or null if its
empty.
- Returns:
- The node to removed.
isEmpty
public boolean isEmpty()
- Returns:
- True if the list is empty, false otherwise.
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
This documentation is Copyright (C) 2000-2003 The University of Utah. All Rights Reserved. See the documentation license for distribution terms and restrictions.
Documentation, software, and mailing lists for the JanosVM can be found at the Janos Project web page: http://www.cs.utah.edu/flux/janos/
Generated on Feb 13, 2003