org.grinvin.engine.apengine

Class StateStack<E>

Known Direct Subclasses:
TreeGenerator.TreeGeneratorStateStack

public abstract class StateStack<E>
extends java.lang.Object

Abstract class for handling state in the tree generators.

Field Summary

protected int
size
protected int
top

Constructor Summary

StateStack()
Create a new StateStack.

Method Summary

protected abstract E[]
createArray(int size)
boolean
empty()
protected abstract E
emptyState()
protected void
extend()
Extend the size of the stack.
E
peek()
E
pop()

Field Details

size

protected int size

top

protected int top

Constructor Details

StateStack

public StateStack()
Create a new StateStack.

Method Details

createArray

protected abstract E[] createArray(int size)

empty

public final boolean empty()

emptyState

protected abstract E emptyState()

extend

protected void extend()
Extend the size of the stack.

peek

public final E peek()

pop

public final E pop()