weiss.nonstandard
Class SortedLinkedList<AnyType extends java.lang.Comparable<? super AnyType>>

java.lang.Object
  extended by weiss.nonstandard.LinkedList<AnyType>
      extended by weiss.nonstandard.SortedLinkedList<AnyType>

public class SortedLinkedList<AnyType extends java.lang.Comparable<? super AnyType>>
extends LinkedList<AnyType>

Linked list implementation of the list using a header node. Access to the list is via LinkedListIterator.

See Also:
LinkedListIterator

Constructor Summary
SortedLinkedList()
           
 
Method Summary
 void insert(AnyType x)
          Insert in sorted order.
 void insert(AnyType x, LinkedListIterator<AnyType> p)
          Insert after p.
static void main(java.lang.String[] args)
           
 
Methods inherited from class weiss.nonstandard.LinkedList
find, findPrevious, first, isEmpty, listSize, makeEmpty, printList, remove, zeroth
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SortedLinkedList

public SortedLinkedList()
Method Detail

insert

public void insert(AnyType x,
                   LinkedListIterator<AnyType> p)
Insert after p.

Overrides:
insert in class LinkedList<AnyType extends java.lang.Comparable<? super AnyType>>
Parameters:
x - the item to insert.
p - this parameter is ignored.

insert

public void insert(AnyType x)
Insert in sorted order.

Parameters:
x - the item to insert.

main

public static void main(java.lang.String[] args)