#import <ObjectiveLib/Set.h>
Inheritance diagram for OLMultiSet:
Public Member Functions | |
(id) | - insert: |
Insert an object into the set. | |
(OLAssociativeIterator *) | - insertAt:value: |
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) | + multiSet |
Create and return a new set. | |
(id) | + multiSetFrom:to: |
Create and return a new set. | |
(id) | + multiSetWithCompare: |
Create and return a new set. | |
(id) | + multiSetWithOLSet: |
Create and return a new set. |
Multiset is identical to set expect that as many instances of a given object may be inserted as desired.
- (id) insert: | (id) | object |
Insert an object into the set.
The object is inserted and an instance of OLAssociativeIterator is returned indicating the position of object in the set.
object | the element to insert |
Reimplemented from OLSet.
- (OLAssociativeIterator*) insertAt: | (OLAssociativeIterator *) | where | ||
value: | (id) | object | ||
Insert an object into the set.
The object is inserted and the position indicated by where is used as a hint about where in the set the object should be placed. There is no guarantee that the object will ultimately placed anywhere close to where. Note that the insertion may fail if the object is already in the set. An iterator is returned that points to object.
where | a hint as to where in the set the object should be located | |
object | the object to insert |
Reimplemented from OLSet.
- (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 | the first in the range of objects to insert | |
last | one position beyond the last in the range of objects to insert |
Reimplemented from OLSet.
- (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 OLSet.
+ (id) multiSet |
Create and return a new set.
An instance of OLLess is used to compare items for sorting.
+ (id) multiSetFrom: | (OLForwardIterator *) | first | ||
to: | (OLForwardIterator *) | last | ||
Create and return a new set.
The set is initialized with the contents of the range [first, last)
. An instance of OLLess is used to compare items for sorting.
first | the first in the range of elements to insert | |
last | one beyond the last in the range of elements to insert |
+ (id) multiSetWithCompare: | (OLStreamableFunctor< OLBoolBinaryFunction > *) | comp |
Create and return a new set.
The set is empty and the comparison function comp is used to sort keys.
comp | the comparison function used to sort keys |
+ (id) multiSetWithOLSet: | (OLSet *) | right |
Create and return a new set.
The set is initialized with the contents of right.
If OpenStep is present the returned object will be autoreleased before being returned.
right | the set to copy |
|