Sparksee  6.0.2
STSObjects Class Reference

Object identifier set class. More...

Inheritance diagram for STSObjects:
Inheritance graph
Collaboration diagram for STSObjects:
Collaboration graph

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...
 

Detailed Description

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.

Author
Sparsity Technologies http://www.sparsity-technologies.com

Method Documentation

- (BOOL) add: (long long)  e

Adds an element into the collection.

Parameters
e[in] Element to be added.
Returns
TRUE if the element is added, FALSE if the element was already into the collection.
- (long long) any

Gets an element from the collection.

Returns
Any element from the collection.
Exceptions
System.ApplicationExceptionnull
System.ApplicationExceptionwhether the collection is empty.
- (STSObjects*) clone

Creates a new Objects instance as a copy of the given one.

Returns
The new Objects instance.
- (long long) cloneWithObjects: (STSObjects *)  objs

Performs the copy operation.

This updates the Objects calling instance and copies the given Objects instance.

Parameters
objs[in] Objects instance.
Returns
Number of elements into the collection once the operation has been executed.
- (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.

Parameters
objs1[in] Objects instance.
objs2[in] Objects instance.
Returns
New 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.

Parameters
objs1[in] Objects instance.
objs2[in] Objects instance.
Returns
New 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.

Parameters
objs1[in] Objects instance.
objs2[in] Objects instance.
Returns
New Objects instance.
- (BOOL) contains: (STSObjects *)  objs

Check if this objects contains the other one.

Parameters
objsObjects collection.
Returns
True if it contains the given object.
- (long long) count

Gets the number of elements into the collection.

Returns
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.

Parameters
objs[in] Objects instance.
Returns
Number of elements into the collection once the operation has been executed.
- (BOOL) equals: (STSObjects *)  objs

Checks if the given Objects contains the same information.

Parameters
objs[in] Objects instance.
Returns
True if the objects are equal or false otherwise.
- (BOOL) exists: (long long)  e

Gets if the given element exists into the collection.

Parameters
e[in] Element.
Returns
TRUE if the element exists into the collection, FALSE otherwise.
- (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.

Parameters
objs[in] Objects instance.
Returns
Number of elements into the collection once the operation has been executed.
- (STSObjectsIterator*) iterator

Gets an ObjectsIterator.

Returns
ObjectsIterator instance.
- (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

Parameters
e[in] The first element to traverse in the resulting ObjectsIterator instance.
Returns
ObjectsIterator instance.
- (STSObjectsIterator*) iteratorFromIndex: (long long)  index

Gets an ObjectsIterator skipping index elements.

Objects collection has no order, so this method is implementation-dependent.

Parameters
index[in] The number of elements to skip from the beginning. It must be in the range [0..Size).
Returns
ObjectsIterator instance.
- (BOOL) remove: (long long)  e

Removes an element from the collection.

Parameters
e[in] Element to be removed.
Returns
TRUE if the element is removed, FALSE if the element was not into the collection.
- (STSObjects*) sample: (STSObjects *)  exclude
samples: (long long)  samples 

Creates a new Objects instance which is a sample of the calling one.

Parameters
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.
Returns
Sample 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

Parameters
objs[in] Objects instance.
Returns
Number of elements into the collection once the operation has been executed.

The documentation for this class was generated from the following file: