ECStack
Abstract
A simple stack implementation
Discussion
Implementation is synchronized
Methods
- -count
- -isEmpty
- -isEqual:
- two stack object equal if they contain the same data in the
same order.
- -popObject
- Removes the top element if existent.
- -pushObject:
- puts the given object on top of all objects. nil is not allowed.
- (unsigned) count;
- method result
- returns the number of elements of the stack
- (BOOL) isEmpty;
- method result
- YES if no data is on the stack
two stack object equal if they contain the same data in the
same order.
- (BOOL)isEqual: (id) anObject;
Removes the top element if existent.
- popObject;
- method result
- removes and returns the top object. Returns nil if not existent
Discussion
The caller of the method has to release the returned reference
puts the given object on top of all objects. nil is not allowed.
- pushObject: (id) toPush;
Parameter Descriptions
toPush
- object to push. May not equal nil.
- method result
- self
(Last Updated November 08, 2007)