SparkseeNet  6.0.2
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
com.sparsity.sparksee.gdb.Objects Class Reference

Object identifier set class. More...

Public Member Functions

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

Static Public Member Functions

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

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.
long com.sparsity.sparksee.gdb.Objects.Any ( ) throws System.ApplicationException, System.ApplicationException

Gets an element from the collection.

Returns
Any element from the collection.
Exceptions
System.ApplicationExceptionwhether the collection is empty.
System.ApplicationExceptionnull
void com.sparsity.sparksee.gdb.Objects.Close ( )

Closes the Objects instance.

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

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

Gets the number of elements into the collection.

Returns
The number of elements into the collection.
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.
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.
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.
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.
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.
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.
com.sparsity.sparksee.gdb.ObjectsIterator com.sparsity.sparksee.gdb.Objects.Iterator ( )

Gets an ObjectsIterator.

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