public interface IStack<T>
Modifier and Type | Method and Description |
---|---|
void |
drawDataType(java.lang.String path,
java.lang.Class c)
Generates a PNG and a DOT file with a figure representing structure the
object
|
int |
getCost()
Gets the cost of the last operation performed
|
boolean |
isEmpty()
Checks if there are data in the stack
|
boolean |
isFull()
Checks if the stack is full
|
java.util.Iterator<T> |
iterator()
Returns an iterator
|
int |
numElements()
Returns the number of elements in the stack
|
boolean |
push(T element)
Inserts a new element on the top of the stack
|
boolean |
removeTop()
Removes the element on the top of the stack
|
T |
top()
Gets the element on the top of the stack
|
boolean isEmpty()
int numElements()
T top()
boolean push(T element)
element
- the element to insert into the stackboolean removeTop()
boolean isFull()
int getCost()
void drawDataType(java.lang.String path, java.lang.Class c)
path
- the path where generate the DOT filejava.util.Iterator<T> iterator()