Sparksee
6.0.2
|
Object identifier set class. More...
Instance Methods | |
(STSObjects *) | - clone |
Creates a new Objects instance as a copy of the given one. More... | |
(long long) | - count |
Gets the number of elements into the collection. More... | |
(BOOL) | - add: |
Adds an element into the collection. More... | |
(BOOL) | - exists: |
Gets if the given element exists into the collection. More... | |
(long long) | - any |
Gets an element from the collection. More... | |
(BOOL) | - remove: |
Removes an element from the collection. More... | |
(void) | - clear |
Clears the collection removing all its elements. | |
(long long) | - union: |
Performs the union operation. More... | |
(long long) | - intersection: |
Performs the intersection operation. More... | |
(long long) | - difference: |
Performs the difference operation. More... | |
(BOOL) | - equals: |
Checks if the given Objects contains the same information. More... | |
(BOOL) | - contains: |
Check if this objects contains the other one. More... | |
(long long) | - cloneWithObjects: |
Performs the copy operation. More... | |
(STSObjects *) | - sample:samples: |
Creates a new Objects instance which is a sample of the calling one. More... | |
(STSObjectsIterator *) | - iterator |
Gets an ObjectsIterator. More... | |
(STSObjectsIterator *) | - iteratorFromIndex: |
Gets an ObjectsIterator skipping index elements. More... | |
(STSObjectsIterator *) | - iteratorFromElement: |
Gets an ObjectsIterator starting from the given element. More... | |
(void) | - close |
Closes the Objects instance. More... | |
(BOOL) | - isClosed |
Check if the Objects instance is closed. | |
(BOOL) | - isEqual: |
Check if both Objects instances are equal. | |
(NSUInteger) | - hash |
Get the hash value of this Objects. | |
Class Methods | |
(long long) | + getInvalidOID |
Invalid OID constant. | |
(STSObjects *) | + combineUnion:objs2: |
Creates a new Objects instance which is the union of the two given. More... | |
(STSObjects *) | + combineIntersection:objs2: |
Creates a new Objects instance which is the intersection of the two given. More... | |
(STSObjects *) | + combineDifference:objs2: |
Creates a new Objects instance which is the difference of the two given. More... | |
Object identifier set class.
It stores a collection of Sparksee object identifiers as a set. As a set, there is no order and no duplicated elements.
This class should be used just to store large collections. Otherwise, it is strongly recommended to use common classes from the language API.
This class is not thread-safe.
ObjectsIterator must be used to traverse all the elements into the set.
When the Objects instance is closed, it closes all existing and non-closed ObjectsIterator instances too.
- (BOOL) add: | (long long) | e |
Adds an element into the collection.
e | [in] Element to be added. |
- (long long) any |
Gets an element from the collection.
System.ApplicationException | null |
System.ApplicationException | whether the collection is empty. |
- (STSObjects*) clone |
Creates a new Objects instance as a copy of the given one.
- (long long) cloneWithObjects: | (STSObjects *) | objs |
Performs the copy operation.
This updates the Objects calling instance and copies the given Objects instance.
objs | [in] Objects instance. |
- (void) close |
Closes the Objects instance.
It must be called before closing the Session to ensure the integrity of all data.
+ (STSObjects*) combineDifference: | (STSObjects *) | objs1 | |
objs2: | (STSObjects *) | objs2 | |
Creates a new Objects instance which is the difference of the two given.
Two given Objects belong to the same Session.
objs1 | [in] Objects instance. |
objs2 | [in] Objects instance. |
+ (STSObjects*) combineIntersection: | (STSObjects *) | objs1 | |
objs2: | (STSObjects *) | objs2 | |
Creates a new Objects instance which is the intersection of the two given.
Two given Objects belong to the same Session.
objs1 | [in] Objects instance. |
objs2 | [in] Objects instance. |
+ (STSObjects*) combineUnion: | (STSObjects *) | objs1 | |
objs2: | (STSObjects *) | objs2 | |
Creates a new Objects instance which is the union of the two given.
Two given Objects belong to the same Session.
objs1 | [in] Objects instance. |
objs2 | [in] Objects instance. |
- (BOOL) contains: | (STSObjects *) | objs |
Check if this objects contains the other one.
objs | Objects collection. |
- (long long) count |
Gets the number of elements into the collection.
- (long long) difference: | (STSObjects *) | objs |
Performs the difference operation.
This updates the Objects calling instance removing those existing elements at the given Objects instance.
objs | [in] Objects instance. |
- (BOOL) equals: | (STSObjects *) | objs |
Checks if the given Objects contains the same information.
objs | [in] Objects instance. |
- (BOOL) exists: | (long long) | e |
Gets if the given element exists into the collection.
e | [in] Element. |
- (long long) intersection: | (STSObjects *) | objs |
Performs the intersection operation.
Updates the Objects calling instance setting those existing elements at both two collections and removing all others.
objs | [in] Objects instance. |
- (STSObjectsIterator*) iterator |
Gets an ObjectsIterator.
- (STSObjectsIterator*) iteratorFromElement: | (long long) | e |
Gets an ObjectsIterator starting from the given element.
Objects collection has no order, so this method is implementation-dependent. e[in] The first element to traverse in the resulting
e | [in] The first element to traverse in the resulting ObjectsIterator instance. |
- (STSObjectsIterator*) iteratorFromIndex: | (long long) | index |
Gets an ObjectsIterator skipping index elements.
Objects collection has no order, so this method is implementation-dependent.
index | [in] The number of elements to skip from the beginning. It must be in the range [0..Size). |
- (BOOL) remove: | (long long) | e |
Removes an element from the collection.
e | [in] Element to be removed. |
- (STSObjects*) sample: | (STSObjects *) | exclude | |
samples: | (long long) | samples | |
Creates a new Objects instance which is a sample of the calling one.
exclude | [in] If not NULL, elements into this collection will be excluded from the resulting one. |
samples | [in] Number of elements into the resulting collection. |
- (long long) union: | (STSObjects *) | objs |
Performs the union operation.
This adds all existing elements of the given Objects instance to the Objects calling instance
objs | [in] Objects instance. |