it.eng.spago.navigation
Class LightNavigator

java.lang.Object
  extended by it.eng.spago.navigation.LightNavigator

public class LightNavigator
extends java.lang.Object

The Class LightNavigator.


Constructor Summary
LightNavigator()
           
 
Method Summary
 void add(MarkedRequest markedRequest)
          Adds a MarkedRequest element to the stack.
 MarkedRequest goBackToMark(java.lang.String mark)
          Retrieves the more recent MarkedRequest object in the stack with the mark passed at input and deletes the more recent MarkedRequest objects present in the stack.
 MarkedRequest goBackToPosition(int i)
          Retrieves the MarkedRequest object at the desired position in the stack and deletes the more recent MarkedRequest objects present in the stack.
 void replaceLast(MarkedRequest markedRequest)
          Deletes the more recent MarkedRequest object in the stack and adds the MarkedRequest passed at input in the first position of the stack.
 void reset()
          Resets the stack.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LightNavigator

public LightNavigator()
Method Detail

add

public void add(MarkedRequest markedRequest)
         throws it.eng.spago.navigation.NavigationException
Adds a MarkedRequest element to the stack.

Parameters:
markedRequest - the MarkedRequest object to be added to the stack
Throws:
NavigationException - the navigation exception

goBackToPosition

public MarkedRequest goBackToPosition(int i)
                               throws it.eng.spago.navigation.NavigationException
Retrieves the MarkedRequest object at the desired position in the stack and deletes the more recent MarkedRequest objects present in the stack.

Parameters:
i - The int representing the position of the stack.
Returns:
the marked request
Throws:
NavigationException - if the position at input is not present in the stack
NavigationException - the navigation exception

replaceLast

public void replaceLast(MarkedRequest markedRequest)
                 throws it.eng.spago.navigation.NavigationException
Deletes the more recent MarkedRequest object in the stack and adds the MarkedRequest passed at input in the first position of the stack.

Parameters:
markedRequest - the MarkedRequest object that will replace the more recent MarkedRequest in the stack
Throws:
NavigationException - if teh MarkedRequest object at input is null of if the stack is empty.
NavigationException - the navigation exception

reset

public void reset()
Resets the stack.


goBackToMark

public MarkedRequest goBackToMark(java.lang.String mark)
                           throws it.eng.spago.navigation.NavigationException
Retrieves the more recent MarkedRequest object in the stack with the mark passed at input and deletes the more recent MarkedRequest objects present in the stack.

Parameters:
mark - The string mark of the desired MarkedRequest object in the stack.
Returns:
the marked request
Throws:
NavigationException - if there are no MarkedRequest objects with the mark passed at input.
NavigationException - the navigation exception

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object