Tools.h++ Manual

22-98 104011 Tandem Computers Incorporated
22
void insert(const T& val);
Inserts the value val into the collection.
RWBoolean isEmpty() const;
Returns
TRUE
if the collection has no items in it,
FALSE
otherwise.
size_t occurrencesOf(const T& val)
const;
Returns the number of items in the collection which are equal to
val
. Equality
is measured by the class-defined equality operator.
RWBoolean remove(const T& val);
Removes the first object which is equal to the object
a
and returns
TRUE
.
Returns
FALSE
if there is no such object. Equality is measured by the class-
defined equality operator.
size_t removeAll(const T& val);
Removes all objects which are equal to the object
a
. Returns the number of
objects removed. Equality is measured by the class-defined equality operator.
void resize(size_t N);
Changes the number of buckets to
N
, a relatively expensive operation if there
are many items in the collection.