Tools.h++ Manual

22-44 104011 Tandem Computers Incorporated
22
T* find(T* a) const;
Returns a pointer to the object which is equal to the object pointed to by
a
, or
nil if no such object can be found. Equality is measured by the class-defined
equality operator for type
T
.
void insert(T* a);
Adds the object pointed to by
a
to the collection.
RWBoolean isEmpty() const;
Returns
TRUE
if the collection has no items in it,
FALSE
otherwise.
size_t occurrencesOf(T* a) const;
Returns the number of objects in the collection which are equal to the object
pointed to by
a
. Equality is measured by the class-defined equality operator
for type
T
.
T* remove(T* a);
Removes the 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(T* a);
Removes 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
.
void resize(size_t N);
Changes the number of buckets to
N
. This will result in all of the objects in the
collection being rehashed.