/** * Last-in-first-out (LIFO) stack component with integer entries. * * @mathmodel
* {@code StackOfInteger is modeled by string of integer}
*
* @constraint
* {@code [no constraint for this component]}
*
*
* @initially
* {@code constructor()
* ensures
* this = <>
*
* constructor(int initialCapacity)
* requires
* initialCapacity > 0
* ensures
* this = <> and
* [the underlying representation may preallocate
* memory for initialCapacity entries]}
*
*
* @author Paolo Bucci
*/
public interface StackOfInteger {
/**
* Adds x to the top of {@code this}.
*
* @param x
* the entry to be added
* @alters this
* @ensures {@code this =