- All Implemented Interfaces:
Command
Implements the 'exit' builtin command.
-
Constructor Summary
Constructors
Constructs a new ExitCommand instance.
-
Method Summary
Exits the shell with the given status code.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ExitCommand
public ExitCommand()
Constructs a new ExitCommand instance. Initializes the built-in 'exit' command.
-
Method Details
-
execute
Exits the shell with the given status code.
- Specified by:
execute in interface Command
- Parameters:
args - The command and its arguments.
rawInput - The raw input string.
currentDirectory - The current working directory.
- Returns:
- The current directory (unreachable).