	
/**	
 * EmptyListNode
 * 
 * 
 * Created: Tue Oct 08 17:44:25 2002
 * 
 * @author <a href="mailto: "</a>
 * @version
 */

package containers;
import java.util.*;
public class EmptyListNode extends AListNode{
   
   private static AListNode onlyOne = new EmptyListNode();
   
   private EmptyListNode() { }  // none outside can access this
   
   public static EmptyListNode singleton(){
	    return (EmptyListNode)onlyOne;
     }
   
   public Object head() {throw new java.util.NoSuchElementException();}

   public List tail() {throw new java.util.NoSuchElementException();}

   public boolean removeFirst ( List owner){
      throw new java.util.NoSuchElementException();
   }

   public void addFirst(Object o, List owner)
   {
      owner.changeState(new NonEmptyListNode( o));
      System.out.println("EmptyNode: "+ " added "+ o + " and changed state ");
   }

}// EmptyListNode
