Tools.h++ Manual
21-184 104011 Tandem Computers Incorporated
21
virtual unsigned hash() const;
Inherited from class 
RWCollectable
.
virtual size_t index(const RWCollectable*) 
const;
Redefined from class RWOrdered. Performs a binary search to return the index 
of the first item that compares equal to the target item, or 
RW_NPOS 
if no such 
item can be found.
virtual RWCollectable* insert(RWCollectable* c);
Redefined from class 
RWOrdered
. Performs a binary search to insert the item 
pointed to by 
c 
after all items that compare less than or equal to it, but before 
all items that compare greater than it. Returns nil if the insertion was 
unsuccessful, 
c 
otherwise.
virtual RWClassID isA() const;
Redefined from class 
RWCollectable 
to return 
__RWSORTEDVECTOR
.
virtual RWBoolean isEmpty() const;
Inherited from class 
RWOrdered
.
virtual RWBoolean isEqual(const RWCollectable* a) 
const;
Inherited from class 
RWCollectable
.
virtual RWCollectable* last() const;
Inherited from class 
RWOrdered
.
virtual size_t occurrencesOf(const 
RWCollectable* target) const;
Redefined from class 
RWOrdered
. Returns the number of items that compare 
equal to the item pointed to by 
target
.
virtual RWCollectable* remove(const RWCollectable* 
target);
Inherited from class 
RWOrdered
.
Note – 
RWOrdered::remove() 
uses the virtual function 
index() 
to perform 
its search. Hence, a binary search will be used.
virtual void removeAndDestroy(const 
RWCollectable* target);
Inherited from class 
RWCollection
.










