All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.loki3.util.LinkedList

java.lang.Object
    |
    +----com.loki3.util.LinkedList

public class LinkedList
extends java.lang.Object
a simple singly linked list.
 LinkedList list = new LinkedList(item1);
 list.addToTail(item2);

 for (Enumeration e=list.elements(); e.hasMoreElements();)
		MyItem item = (MyItem)e.nextElement();
 


Constructor Index

 o LinkedList(Object)
 

Method Index

 o addToHead(Object)
add 'item' to the head of the list
 o addToTail(Object)
add 'item' to the end of the list
 o elements()
get an object that aids in stepping through the elements
 o getItem()
the content
 o getNext()
get the next linked list object in the list
 o getTail()
get the last object in the list
 o remove(Object)
remove 'item' from list

Constructor Detail

 o LinkedList
public LinkedList(java.lang.Object item)

Method Detail

 o getItem
public java.lang.Object getItem()
          the content
 o getNext
public LinkedList getNext()
          get the next linked list object in the list
 o getTail
public LinkedList getTail()
          get the last object in the list
 o elements
public LinkedListEnumeration elements()
          get an object that aids in stepping through the elements
 o addToHead
public LinkedList addToHead(java.lang.Object item)
          add 'item' to the head of the list
Returns:
the new head of the list
 o addToTail
public LinkedList addToTail(java.lang.Object item)
          add 'item' to the end of the list
Returns:
the new head of the list
 o remove
public LinkedList remove(java.lang.Object item)
          remove 'item' from list
Returns:
the new head of the list

All Packages  Class Hierarchy  This Package  Previous  Next  Index