public class CountryStack
extends java.lang.Object
It can use CountryElement as its member type. There is a CountryPathStack subclass that extends it to allow each unit to be a list of Country's.
You can pop from the front.
Constructor and Description |
---|
CountryStack() |
Modifier and Type | Method and Description |
---|---|
boolean |
isEmpty() |
int |
pop()
Get the country-code from the top of the stack.
|
void |
push(Country country)
Add a Country to the top of the stack.
|
void |
pushWithValue(Country country,
int value)
Add a Country into the stack.
|
int |
size() |
int |
topValue() |
public boolean isEmpty()
public int pop()
public void push(Country country)
public void pushWithValue(Country country, int value)
public int size()
public int topValue()