DexNet 4.7.0
Public Member Functions | Static Public Member Functions | Static Public Attributes
com::sparsity::dex::gdb::Objects Class Reference

Object identifier set class. More...

List of all members.

Public Member Functions

long Any () throws System.ApplicationException, System.ApplicationException
 Gets an element from the collection.
long Difference (com.sparsity.dex.gdb.Objects objs)
 Performs the difference operation.
com.sparsity.dex.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.dex.gdb.Objects objs)
 Checks if the given Objects contains the same information.
long Copy (com.sparsity.dex.gdb.Objects objs)
 Performs the copy operation.
com.sparsity.dex.gdb.Objects Sample (com.sparsity.dex.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.dex.gdb.Objects objs)
 Check if this objects contains the other one.
bool equals (System.Object o)
 Returns true if the collection is equal to the object.
long Count ()
 Gets the number of elements into the collection.
void Clear ()
 Clears the collection removing all its elements.
com.sparsity.dex.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.dex.gdb.Objects objs)
 Performs the intersection operation.
com.sparsity.dex.gdb.ObjectsIterator Iterator ()
 Gets an ObjectsIterator.
long Union (com.sparsity.dex.gdb.Objects objs)
 Performs the union operation.
bool Add (long e)
 Adds an element into the collection.
com.sparsity.dex.gdb.Objects Copy ()
 Creates a new Objects instance as a copy of the given one.

Static Public Member Functions

static com.sparsity.dex.gdb.Objects CombineUnion (com.sparsity.dex.gdb.Objects objs1, com.sparsity.dex.gdb.Objects objs2)
 Creates a new Objects instance which is the union of the two given.
static com.sparsity.dex.gdb.Objects CombineDifference (com.sparsity.dex.gdb.Objects objs1, com.sparsity.dex.gdb.Objects objs2)
 Creates a new Objects instance which is the difference of the two given.
static com.sparsity.dex.gdb.Objects CombineIntersection (com.sparsity.dex.gdb.Objects objs1, com.sparsity.dex.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 Dex object identifiers as a set. As a set, there is 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.

Object identifiers cannot be added or removed from an Objects instance while iterators are still traversing the collection. Any objects modifying method will invalidate it's open iterators.

Also, in case Objects has been retrieved from the Graph, this collection cannot be updated through its Graph. For example, if we retrieve all the objects belonging to a given node or edge type, we cannot add or drop nodes or edges of this type while traversing the retrieved collection.

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

Member Function Documentation

bool com::sparsity::dex::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::dex::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::dex::gdb::Objects::Close ( )

Closes the Objects instance.

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

static com.sparsity.dex.gdb.Objects com::sparsity::dex::gdb::Objects::CombineDifference ( com.sparsity.dex.gdb.Objects  objs1,
com.sparsity.dex.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.dex.gdb.Objects com::sparsity::dex::gdb::Objects::CombineIntersection ( com.sparsity.dex.gdb.Objects  objs1,
com.sparsity.dex.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.dex.gdb.Objects com::sparsity::dex::gdb::Objects::CombineUnion ( com.sparsity.dex.gdb.Objects  objs1,
com.sparsity.dex.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::dex::gdb::Objects::Contains ( com.sparsity.dex.gdb.Objects  objs)

Check if this objects contains the other one.

Parameters:
objsObjects collection.
Returns:
True if it contains the given object.
com.sparsity.dex.gdb.Objects com::sparsity::dex::gdb::Objects::Copy ( )

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

Returns:
The new Objects instance.
long com::sparsity::dex::gdb::Objects::Copy ( com.sparsity.dex.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.
long com::sparsity::dex::gdb::Objects::Count ( )

Gets the number of elements into the collection.

Returns:
The number of elements into the collection.
long com::sparsity::dex::gdb::Objects::Difference ( com.sparsity.dex.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::dex::gdb::Objects::Equals ( com.sparsity.dex.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::dex::gdb::Objects::equals ( System.Object  o)

Returns true if the collection is equal to the object.

Parameters:
oobject to compare with the collection.
Returns:
true if the objects are equal or false otherwise.
bool com::sparsity::dex::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::dex::gdb::Objects::Intersection ( com.sparsity.dex.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::dex::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.dex.gdb.ObjectsIterator com::sparsity::dex::gdb::Objects::Iterator ( )

Gets an ObjectsIterator.

Returns:
ObjectsIterator instance.
com.sparsity.dex.gdb.ObjectsIterator com::sparsity::dex::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.dex.gdb.ObjectsIterator com::sparsity::dex::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::dex::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.dex.gdb.Objects com::sparsity::dex::gdb::Objects::Sample ( com.sparsity.dex.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::dex::gdb::Objects::Union ( com.sparsity.dex.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.