Package org.snakeyaml.engine.v2.common
Class ArrayStack<T>
java.lang.Object
org.snakeyaml.engine.v2.common.ArrayStack<T>
- Type Parameters:
T
- data to keep in stack
Custom stack
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
stack
-
-
Constructor Details
-
ArrayStack
public ArrayStack(int initSize) Create empty stack- Parameters:
initSize
- - the initial size of the stack
-
-
Method Details
-
push
Add the element to the head- Parameters:
obj
- - data to be added
-
pop
Get the head and remove it from the stack- Returns:
- the head
-
isEmpty
public boolean isEmpty()Check- Returns:
- true when it contains nothing
-