Interface Stack
access this type via: data.adt.Stack (provides, requires or uses)
A stack of data items.
Transfer fields
Data content[]
Functions
void push(storeData item)
Data pop()
Data peek()
void remove(Data item)
void update(Data item, storeData newVersion)
int getLength()
Data[] getContents()
Transfer fields
content The current contents of the stack, as an array.
void push(storeData item)
Add an element to the stack.
Data pop()
Read and remove an element from the stack, according to the stack policy.
Data peek()
Read (but do not remove) the top element on the stack, according to the stack policy.
void remove(Data item)
Remove an element from the stack.
void update(Data item, storeData newVersion)
Update an element in the stack.
int getLength()
Data[] getContents()