linkedLists
Class SLinkedList2

java.lang.Object
  extended by linkedLists.SLinkedList2

public class SLinkedList2
extends java.lang.Object

Singly linked list with head and tail, storing strings


Constructor Summary
SLinkedList2()
          Default constructor that creates an empty list
 
Method Summary
 void addFirst(Node n)
          add a new node at front of list
 void addLast(Node n)
          Add a new node n to tail of list
 void addLastValue(java.lang.String s)
           
 void addValue(java.lang.String s)
          add node to front of list containing a given value
 boolean isEmpty()
          /**is the list empty?
 void removeFirst()
           
 java.lang.String toString()
          String representation of list
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SLinkedList2

public SLinkedList2()
Default constructor that creates an empty list

Method Detail

isEmpty

public boolean isEmpty()
/**is the list empty?


addLast

public void addLast(Node n)
Add a new node n to tail of list


addLastValue

public void addLastValue(java.lang.String s)

addFirst

public void addFirst(Node n)
add a new node at front of list


addValue

public void addValue(java.lang.String s)
add node to front of list containing a given value


removeFirst

public void removeFirst()

toString

public java.lang.String toString()
String representation of list

Overrides:
toString in class java.lang.Object