# 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.

### count

>     - (unsigned) count;

method result
  returns the number of elements of the stack

### isEmpty

>     - (BOOL) isEmpty;

method result
  YES if no data is on the stack

### isEqual:

two stack object equal if they contain the same data in the same order.

>     - (BOOL)isEqual: (id) anObject;

### popObject

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

### pushObject:

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 August 27, 2006)