org.h2gis.drivers.gpx.model
Class StringStack

java.lang.Object
  extended by org.h2gis.drivers.gpx.model.StringStack

public final class StringStack
extends Object

This class is a stack to keep in memory the structure of the GPX file.

Author:
Erwan Bocher and Antonin Piasco

Constructor Summary
StringStack(int capacity)
          Instantiates a StringStack with chosen max size.
 
Method Summary
 String pop()
          Removes the last string of the stack.
 boolean push(String newText)
          Puts string in the stack.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringStack

public StringStack(int capacity)
Instantiates a StringStack with chosen max size.

Parameters:
capacity - max size
Method Detail

push

public boolean push(String newText)
Puts string in the stack.

Parameters:
newText - A new string to put in the stack
Returns:
false if the stack is full

pop

public String pop()
Removes the last string of the stack.

Returns:
the last string of the stack, null if the stack is empty


Copyright © 2015 IRSTV CNRS-FR-2488. All Rights Reserved.