Tools.h++ Manual

104011 Tandem Computers Incorporated 21-41
21
virtual unsigned hash() const;
Inherited from class
RWCollectable
.
unsigned height() const;
Inherited from class
RWBTree
.
RWCollectable* insertKeyAndValue(RWCollectable*
key,RWCollectable* value);
Adds a key-value pair to the collection and returns the key if successful, nil if
the key is already in the collection.
virtual RWClassID isA() const;
Redefined from class
RWCollectable
to return
__RWBTREEDICTIONARY
.
virtual RWBoolean isEmpty() const;
Inherited from class
RWBTree
.
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 keys that
compare equal with
target
. Because duplicates are not allowed, this function
can only return 0 or 1.
virtual RWCollectable* remove(const RWCollectable*
target);
Redefined from class
RWCollection
. Removes the key and value pair for
which the key compares equal to the object pointed to by
target
. Returns the
key, or nil if no match was found.
virtual void removeAndDestroy(const
RWCollectable* target);
Redefined from class
RWCollection
. Removes and deletes the key and value
pair for which the key compares equal to the object pointed to by
target
.
Note – Both the key and the value are deleted. Does nothing if the key is not
found.