stamp.util
Class LinkedList

java.lang.Object
  |
  +--stamp.util.LinkedList

public class LinkedList
extends Object

A linked list.


Field Summary
protected  LinkedListItem list
           
 
Constructor Summary
LinkedList()
           
 
Method Summary
 void addItem(LinkedListItem item)
          Add an item to the list.
 LinkedListItem getFirst()
          Return the first item in the list.
 LinkedListItem getLast()
          return the last item in the list
 LinkedListItem getNext(LinkedListItem item)
          Given an item in the list return the next item.
 LinkedListItem getNextLoop(LinkedListItem item)
          Given an item in the list return the next item, or the first item in the list if the end of the list is reached.
 void removeItem(LinkedListItem item)
          Remove an item from the list.
 
Methods inherited from class java.lang.Object
equals
 

Field Detail

list

protected LinkedListItem list
Constructor Detail

LinkedList

public LinkedList()
Method Detail

getFirst

public LinkedListItem getFirst()
                        throws NoSuchElementException
Return the first item in the list.

getLast

public LinkedListItem getLast()
                       throws NoSuchElementException
return the last item in the list

getNext

public LinkedListItem getNext(LinkedListItem item)
                       throws NoSuchElementException
Given an item in the list return the next item.

getNextLoop

public LinkedListItem getNextLoop(LinkedListItem item)
                           throws NoSuchElementException
Given an item in the list return the next item, or the first item in the list if the end of the list is reached.

addItem

public void addItem(LinkedListItem item)
Add an item to the list. The item is added to the head of the list.

removeItem

public void removeItem(LinkedListItem item)
Remove an item from the list.