console
Class DirectoryStack

java.lang.Object
  extended by console.DirectoryStack

public class DirectoryStack
extends java.lang.Object

Processes "make entering" and "make leaving" messages, to update the current directory. Uses a stack so it can push and pop previous values.


Constructor Summary
DirectoryStack()
           
 
Method Summary
 java.lang.String current()
           
 boolean isEmpty()
           
static void main(java.lang.String[] args)
           
 java.lang.String pop()
           
 boolean processLine(java.lang.String line)
           
 void push(java.lang.String v)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectoryStack

public DirectoryStack()
Method Detail

processLine

public boolean processLine(java.lang.String line)
Returns:
true if the directory has changed (i.e. an entering/leaving message has been encountered

current

public java.lang.String current()
Returns:
the current directory on the top of the stack

push

public void push(java.lang.String v)

isEmpty

public boolean isEmpty()

pop

public java.lang.String pop()

main

public static void main(java.lang.String[] args)