JNodeOS v1.1.5 API

edu.utah.janos.util
Class LinkedList

java.lang.Object
  |
  +--edu.utah.janos.util.LinkedList

public class LinkedList
extends java.lang.Object

A simple doubly linked list implementation, it exports the node object directly so adding and removing is fast


Inner Class Summary
static class LinkedList.Node
          A node for use in doubly linked lists.
 
Constructor Summary
LinkedList()
          Create a linked list
 
Method Summary
 void addHead(LinkedList.Node node)
          Add a node to the head of the list
 void addTail(LinkedList.Node node)
          Add a node to the tail of the list
 LinkedList.Node getHead()
          Get the head of the list
 LinkedList.Node getTail()
          Get the tail of the list
 boolean isEmpty()
          Returns true if the list is empty
 LinkedList.Node remHead()
          Remove the node at the head of the list, returns null if its empty
 LinkedList.Node remTail()
          Remove the node at the tail of the list, returns null if its empty
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinkedList

public LinkedList()
Create a linked list
Method Detail

isEmpty

public final boolean isEmpty()
Returns true if the list is empty

getHead

public final LinkedList.Node getHead()
Get the head of the list

getTail

public final LinkedList.Node getTail()
Get the tail of the list

addHead

public void addHead(LinkedList.Node node)
Add a node to the head of the list

addTail

public void addTail(LinkedList.Node node)
Add a node to the tail of the list

remHead

public LinkedList.Node remHead()
Remove the node at the head of the list, returns null if its empty

remTail

public LinkedList.Node remTail()
Remove the node at the tail of the list, returns null if its empty

JNodeOS v1.1.5 API

This documentation is Copyright (C) 1998-2001 The University of Utah. All Rights Reserved. See the file LICENSE for distribution terms.
Documentation, software, and mailing list archives for Janos can be found at the Janos Project: http://www.cs.utah.edu/flux/janos/