- All Implemented Interfaces:
Command
Implements the 'echo' builtin command.
-
Constructor Summary
Constructors
Constructs a new EchoCommand instance.
-
Method Summary
Prints its arguments to standard output.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
EchoCommand
public EchoCommand()
Constructs a new EchoCommand instance. Initializes the built-in 'echo' command.
-
Method Details
-
execute
Prints its arguments to standard output.
- 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 (unchanged).