SparkseeNet 6.1.0
com.sparsity.sparksee.gdb.Objects Class Reference

Object identifier set class. More...

Public Member Functions

long Copy (com.sparsity.sparksee.gdb.Objects objs)
 Performs the copy operation.
 
long Count ()
 Gets the number of elements into the collection.
 
bool Equals (com.sparsity.sparksee.gdb.Objects objs)
 Checks if the given Objects contains the same information.
 
long Any () throws System.ApplicationException, System.ApplicationException
 Gets an element from the collection.
 
bool Contains (com.sparsity.sparksee.gdb.Objects objs)
 Check if this objects contains the other one.
 
com.sparsity.sparksee.gdb.ObjectsIterator Iterator ()
 Gets an ObjectsIterator.
 
long Union (com.sparsity.sparksee.gdb.Objects objs)
 Performs the union operation.
 
boolean IsClosed ()
 Gets if Objects instance has been closed or not.
 
long Intersection (com.sparsity.sparksee.gdb.Objects objs)
 Performs the intersection operation.
 
void Clear ()
 Clears the collection removing all its elements.
 
com.sparsity.sparksee.gdb.ObjectsIterator IteratorFromIndex (long index)
 Gets an ObjectsIterator skipping index elements.
 
bool Equals (System.Object other)
 Indicates whether the current object is equal to another object.
 
bool Exists (long e)
 Gets if the given element exists into the collection.
 
com.sparsity.sparksee.gdb.Objects Copy ()
 Creates a new Objects instance as a copy of the given one.
 
long Difference (com.sparsity.sparksee.gdb.Objects objs)
 Performs the difference operation.
 
com.sparsity.sparksee.gdb.Objects Sample (com.sparsity.sparksee.gdb.Objects exclude, long samples)
 Creates a new Objects instance which is a sample of the calling one.
 
void Close ()
 Closes the Objects instance.
 
bool Add (long e)
 Adds an element into the collection.
 
bool Remove (long e)
 Removes an element from the collection.
 
com.sparsity.sparksee.gdb.ObjectsIterator IteratorFromElement (long e)
 Gets an ObjectsIterator starting from the given element.
 

Static Public Member Functions

static com.sparsity.sparksee.gdb.Objects CombineIntersection (com.sparsity.sparksee.gdb.Objects objs1, com.sparsity.sparksee.gdb.Objects objs2)
 Creates a new Objects instance which is the intersection of the two given.
 
static com.sparsity.sparksee.gdb.Objects CombineUnion (com.sparsity.sparksee.gdb.Objects objs1, com.sparsity.sparksee.gdb.Objects objs2)
 Creates a new Objects instance which is the union of the two given.
 
static com.sparsity.sparksee.gdb.Objects CombineDifference (com.sparsity.sparksee.gdb.Objects objs1, com.sparsity.sparksee.gdb.Objects objs2)
 Creates a new Objects instance which is the difference of the two given.
 

Static Public Attributes

static long InvalidOID
 Invalid OID constant.
 

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

Member Function Documentation

◆ Add()

bool com.sparsity.sparksee.gdb.Objects.Add ( 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.

◆ Any()

long com.sparsity.sparksee.gdb.Objects.Any ( ) throws System.ApplicationException, System.ApplicationException

Gets an element from the collection.

Errorfor other issues.

Returns
Any element from the collection.
Exceptions
System.ApplicationExceptionnull
System.ApplicationExceptionwhether the collection is empty.

◆ Close()

void com.sparsity.sparksee.gdb.Objects.Close ( )

Closes the Objects instance.

It must be called to ensure the integrity of all data.

◆ CombineDifference()

static com.sparsity.sparksee.gdb.Objects com.sparsity.sparksee.gdb.Objects.CombineDifference ( com.sparsity.sparksee.gdb.Objects objs1,
com.sparsity.sparksee.gdb.Objects objs2 )
static

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.

◆ CombineIntersection()

static com.sparsity.sparksee.gdb.Objects com.sparsity.sparksee.gdb.Objects.CombineIntersection ( com.sparsity.sparksee.gdb.Objects objs1,
com.sparsity.sparksee.gdb.Objects objs2 )
static

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.

◆ CombineUnion()

static com.sparsity.sparksee.gdb.Objects com.sparsity.sparksee.gdb.Objects.CombineUnion ( com.sparsity.sparksee.gdb.Objects objs1,
com.sparsity.sparksee.gdb.Objects objs2 )
static

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.

◆ Contains()

bool com.sparsity.sparksee.gdb.Objects.Contains ( com.sparsity.sparksee.gdb.Objects objs)

Check if this objects contains the other one.

Parameters
objsObjects collection.
Returns
True if it contains the given object.

◆ Copy() [1/2]

com.sparsity.sparksee.gdb.Objects com.sparsity.sparksee.gdb.Objects.Copy ( )

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

Returns
The new Objects instance.

◆ Copy() [2/2]

long com.sparsity.sparksee.gdb.Objects.Copy ( com.sparsity.sparksee.gdb.Objects 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.

◆ Count()

long com.sparsity.sparksee.gdb.Objects.Count ( )

Gets the number of elements into the collection.

Returns
The number of elements into the collection.

◆ Difference()

long com.sparsity.sparksee.gdb.Objects.Difference ( com.sparsity.sparksee.gdb.Objects 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.

◆ Equals() [1/2]

bool com.sparsity.sparksee.gdb.Objects.Equals ( com.sparsity.sparksee.gdb.Objects 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.

◆ Equals() [2/2]

bool com.sparsity.sparksee.gdb.Objects.Equals ( System.Object other)

Indicates whether the current object is equal to another object.

Parameters
otherAn object to compare with this instance.
Returns
TRUE if the current object is equal to the other; otherwise, FALSE.

◆ Exists()

bool com.sparsity.sparksee.gdb.Objects.Exists ( 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.

◆ Intersection()

long com.sparsity.sparksee.gdb.Objects.Intersection ( com.sparsity.sparksee.gdb.Objects 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.

◆ IsClosed()

boolean com.sparsity.sparksee.gdb.Objects.IsClosed ( )

Gets if Objects instance has been closed or not.

See also
Close()
Returns
TRUE if the Objects instance has been closed, FALSE otherwise.

◆ Iterator()

com.sparsity.sparksee.gdb.ObjectsIterator com.sparsity.sparksee.gdb.Objects.Iterator ( )

Gets an ObjectsIterator.

Returns
ObjectsIterator instance.

◆ IteratorFromElement()

com.sparsity.sparksee.gdb.ObjectsIterator com.sparsity.sparksee.gdb.Objects.IteratorFromElement ( 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.

◆ IteratorFromIndex()

com.sparsity.sparksee.gdb.ObjectsIterator com.sparsity.sparksee.gdb.Objects.IteratorFromIndex ( 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.

◆ Remove()

bool com.sparsity.sparksee.gdb.Objects.Remove ( 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.

◆ Sample()

com.sparsity.sparksee.gdb.Objects com.sparsity.sparksee.gdb.Objects.Sample ( com.sparsity.sparksee.gdb.Objects exclude,
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.

◆ Union()

long com.sparsity.sparksee.gdb.Objects.Union ( com.sparsity.sparksee.gdb.Objects 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.