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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringpop()Removes the last string of the stack.booleanpush(String newText)Puts string in the stack.
-
-
-
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
-
-