Protocol DStackable

Adopted by:
DCircle, DList
Declared in:
DStackable.h

Protocol Description

The DStackable protocol specifies methods for classes that implements a stack.

Last modified:
31-Oct-2007 (DStackable.h)

Method Index

- (BOOL) isEmpty
Check if the buffer is empty
Returns:
is it ?
- (long) length
Return the number of stored objects
Returns:
the length
- (id) pop
Pop an object from the stack (LIFO)
Returns:
the object (or nil if empty)
- (BOOL) push :(id) obj
Push an object on the stack (LIFO)
Parameters:
obj - the object to be pushed
Returns:
success (or buffer full)
- (id) tos
Return the object on top of the stack (LIFO) (without changing the top of the stack)
Returns:
the object (or nil if empty)

generated 05-Nov-2007 by ObjcDoc 3.0.0