Package org.h2gis.functions.io.gpx.model

# Class StringStack

java.lang.Object
org.h2gis.functions.io.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

Constructors
Constructor
Description
`StringStack(int capacity)`
Instantiates a StringStack with chosen max size.

## Method Summary

Modifier and Type
Method
Description
`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 Details

### StringStack

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

Parameters:
  `capacity` - max size

## Method Details

### 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