Tools.h++ Manual

21-164 104011 Tandem Computers Incorporated
21
virtual RWCollectable* find(const RWCollectable*
target) const;
Redefined from class
RWCollection
. Returns the item in self which isEqual to
the item pointed to by
target
or nil if no item is found. Hashing is used to
narrow the search.
virtual unsigned hash() const;
Inherited from class
RWCollectable
.
virtual RWCollectable* insert(RWCollectable* c);
Redefined from class
RWCollection
. Adds
c
to the collection and returns it.
If an item is already in the collection which isEqual to
c
, then the old item is
returned and the new item is not inserted.
virtual RWClassID isA() const;
Redefined from class
RWCollectable
to return
__RWSET
.
virtual RWBoolean isEmpty() const;
Redefined from class
RWCollection
.
virtual RWBoolean isEqual(const RWCollectable* a)
const;
Inherited from class
RWCollectable
.
virtual size_t occurrencesOf(const
RWCollectable* target) const;
Redefined from class
RWCollection
. Returns the number of entries that
isEqual to the item pointed to by
target
. Because duplicates are not allowed
for this collection, only 0 or 1 can be returned.
virtual RWCollectable* remove(const RWCollectable*
target);
Redefined from class
RWCollection
. Returns and removes the item that
isEqual to the item pointed to by
target
, or nil if there is no item.
virtual void removeAndDestroy(const
RWCollectable* target);
Inherited from class
RWCollection
.
void resize(size_t n = 0);
Resizes the internal hashing table to the next highest prime number that is
greater than or equal to
n
. If
n==0
, then the next highest prime number greater
than or equal to the present size.