Tools.h++ Class Reference

Table Of Contents
Returns a pointer to the last item in the collection. If there are no items in the
collection then an exception of type RWBoundsError will occur.
size_t
length() const;
Returns the number of items currently in the collection.
size_t
occurrencesOf(const T* a) const;
Performs a linear search, returning the number of objects in the collection that are
equal to the object pointed to by a. Equality is measured by the class-defined
equality operator for type T.
void
prepend(T* a);
Adds the item pointed to by a to the beginning of the collection. The collection
will be resized automatically if this causes the number of items to exceed the
capacity.
T*
remove(const T* a);
Performs a linear search, removing the first object which is equal to the object
pointed to by a and returns a pointer to it, or nil if no such object could be found.
Equality is measured by the class-defined equality operator for type T.
size_t
removeAll(const T* a);
Performs a linear search, removing all objects which are equal to the object pointed
to by a. Returns the number of objects removed. Equality is measured by the
class-defined equality operator for type T.