/*--------------------------------------------------------------------------- -- JAWAA 2.0 -- Copyright information: Susan H. Rodger, Pretesh Patel, Ayonike Akingbade, Diana Jackson Computer Science Department Duke University August 2001 Supported by National Science Foundation DUE-9752583. Copyright (c) 2001 All rights reserved. Redistribution and use in source and binary forms are permitted provided that the above copyright notice and this paragraph are duplicated in all such forms and that any documentation, advertising materials, and other materials related to such distribution and use acknowledge that the software was developed by the author. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. ---------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------- File: nameoffile.java Package: JAWAA Version 2.0 Author: Pretesh Patel, Ayonike Akingbade, Diana Jackson Date: August 2001 Description of Contents: --------------------------------------------------------------------------*/ package jawaa.command; import jawaa.structure.*; public class PopCommand extends JawaaCommand { public PopCommand(String[] args) { super("Pop"); try { myTarget = args[1]; } catch (Exception e) { System.out.println("error in PopCommand: "+e); } } public boolean step() { try { ((JawaaStack)myData.get(myTarget)).pop(); } catch(Exception e) { //notify error handler, not the right type of object System.out.println("error in PushCommand: "+e); } return false; } private String myTarget; }