jp.develop.common.util.amf.util
Class PathStack

java.lang.Object
  extended by jp.develop.common.util.amf.util.PathStack

public class PathStack
extends Object

Stack for path name. It is useful to keep the position in recursive operation.

Author:
Waki Takeya

Constructor Summary
PathStack()
          Default Constructor.
PathStack(String separator, boolean debug)
          Constructor with debug option.
PathStack(String separator, boolean debug, PrintStream out)
          Constructor with debug option and writer.
 
Method Summary
 int getLevel()
          Get the level of path.
 void logMessage(String message)
          Log message with property name.
 void popIndex(int index)
          Pop a index.
 void popProperty(String property)
          Pop a property.
 void pushIndex(int index)
          Push a index.
 void pushProperty(String property)
          Push a property.
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PathStack

public PathStack()
Default Constructor.


PathStack

public PathStack(String separator,
                 boolean debug)
Constructor with debug option.

Parameters:
separator - Token for separator.
debug - true for debug mode.

PathStack

public PathStack(String separator,
                 boolean debug,
                 PrintStream out)
Constructor with debug option and writer.

Parameters:
separator - Token for separator.
debug - true for debug mode.
out - The appender for messages.
Method Detail

logMessage

public void logMessage(String message)
                throws IOException
Log message with property name.

Parameters:
message - Message.
Throws:
IOException

pushProperty

public void pushProperty(String property)
Push a property.

Parameters:
property - Property name to be pushed.

pushIndex

public void pushIndex(int index)
Push a index.

Parameters:
index - Index value to be pushed.

popProperty

public void popProperty(String property)
Pop a property.

Parameters:
property - Property name to be popped.

popIndex

public void popIndex(int index)
Pop a index.

Parameters:
index - Index value to be popped.

getLevel

public int getLevel()
Get the level of path.

Returns:
The level of path.

toString

public String toString()
Overrides:
toString in class Object