Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. package Model.Statements;
  2.  
  3. import Model.PrgState;
  4. import MyExceptions.MyControllerException;
  5.  
  6. public class ReturnStmt implements IStmt {
  7.  
  8. public ReturnStmt(){}
  9.  
  10. @Override
  11. public PrgState execute(PrgState state) throws MyControllerException {
  12. state.getAllDicts().pop();
  13. state.setDict(state.getAllDicts().peek());
  14. return null;
  15. }
  16.  
  17. @Override
  18. public String toString(){
  19. return "return";
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement