#import <ObjectiveLib/HashSet.h>
Inheritance diagram for OLHashMultiSet:
Public Member Functions | |
(id) | - insert: |
Insert an object into the set. | |
(void) | - insertFrom:to: |
Insert a range of objects into the set. | |
(BOOL) | - isEqual: |
Test whether another set is equal to this one. | |
Static Public Member Functions | |
(id) | + hashMultiSet |
Create and return a new hash set. | |
(id) | + hashMultiSetFrom:to: |
Create and return a new hash set. | |
(id) | + hashMultiSetWithHashSet: |
Create and return a new hash set. |
Hash multiset is identical to hash set expect that as many instances of a given object may be inserted as desired.
+ (id) hashMultiSet |
Create and return a new hash set.
+ (id) hashMultiSetFrom: | (OLForwardIterator *) | first | ||
to: | (OLForwardIterator *) | last | ||
Create and return a new hash set.
The hash set is initialized with the contents of the range [first, last)
.
[first, last)
must respond to the message hash
.first | the first in the range of elements to insert | |
last | one beyond the last in the range of elements to insert |
+ (id) hashMultiSetWithHashSet: | (OLHashSet *) | right |
Create and return a new hash set.
The hash set is initialized with the contents of right.
The argument right may be an instance of OLHashSet or of OLHashMultiSet.
right | the hash set to copy |
- (id) insert: | (id) | object |
Insert an object into the set.
The object is inserted and an instance of OLHashIterator is returned indicating the position of object in the set.
hash
.object | the element to insert |
Reimplemented from OLHashSet.
- (void) insertFrom: | (OLForwardIterator *) | first | ||
to: | (OLForwardIterator *) | last | ||
Insert a range of objects into the set.
An attempt is made to insert all objects in the range [first, last)
, however there is no guarantee that any of the elements in the range will actually be inserted if they already exist in the set.
[first, last)
must respond to the message hash
.first | the first in the range of objects to insert | |
last | one position beyond the last in the range of objects to insert |
Reimplemented from OLHashSet.
- (BOOL) isEqual: | (id) | object |
Test whether another set is equal to this one.
Two sets are considered equal if they contain the same number of objects and the objects are in the same order and each object is equal to the corresponding object in the other set.
object | the object to test |
Reimplemented from OLHashSet.
|