Class Pushd

java.lang.Object
  |
  +--Command
        |
        +--Pushd

public class Pushd
extends Command

The Pushd class (a subclass of the abstract base class Command) implements the familiar unix command pushd, which pushes the current directory onto the directory stack and changes the working directory to its argument. This class implements the abstract methods execute and getDescription inherited from the abstract base class Command.


Constructor Summary
Pushd()
           
 
Method Summary
 java.lang.String execute(java.lang.String args)
          Executes the pushd command and returns the result in the form of a String object.
 java.lang.String getDescription()
          Returns a description of the command.
 
Methods inherited from class Command
ExpandArgs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Pushd

public Pushd()
Method Detail

execute

public java.lang.String execute(java.lang.String args)
Executes the pushd command and returns the result in the form of a String object.

Specified by:
execute in class Command
Parameters:
args - arguments for this command.
Returns:
the string result of executing the pushd command.

getDescription

public java.lang.String getDescription()
Description copied from class: Command
Returns a description of the command.

Specified by:
getDescription in class Command
Returns:
the name of the command.