Click or drag to resize

IElement Interface

An Element is the base class for both vertices and edges. An element has an identifier that must be unique to its inheriting classes (vertex or edges). An element can maintain a collection of key/value properties. Keys are always Strings and values can be any object. Particular implementations can reduce the space of objects that can be used as values. Typically, objects are C# primitives (e.g. string, long, int, boolean, etc.)

Namespace:  VelocityGraph.Frontenac.Blueprints
Assembly:  VelocityGraph (in VelocityGraph.dll) Version: 11.1.0.0 (11.1)
Syntax
public interface IElement : IDictionary<string, Object>, 
	ICollection<KeyValuePair<string, Object>>, IEnumerable<KeyValuePair<string, Object>>, 
	IEnumerable, IDictionary, ICollection

The IElement type exposes the following members.

Properties
  NameDescription
Public propertyGraph
The graph that owns this IElement.
Public propertyId
An identifier that is unique to its inheriting class. All vertices of a graph must have unique identifiers. All edges of a graph must have unique identifiers.
Top
Methods
  NameDescription
Public methodGetProperty
Return the object value associated with the provided string key. If no value exists for that key, return null.
Public methodGetPropertyKeys
Return all the keys associated with the element.
Public methodRemove
Remove the element from the graph.
Public methodRemoveProperty
Un-assigns a key/value property from the element. The object value of the removed property is returned.
Public methodSetProperty
Assign a key/value property to the element. If a value already exists for this key, then the previous key/value is overwritten.
Top
Extension Methods
  NameDescription
Public Extension MethodAreEqual
A standard method for determining if two elements are equal. This method should be used by any Element.equals() implementation to ensure consistent behavior.
(Defined by ElementHelpers.)
Public Extension MethodCopyProperties
Copy the properties (key and value) from one element to another. The properties are preserved on the from element. ElementPropertiesRule that share the same key on the to element are overwritten.
(Defined by ElementHelpers.)
Public Extension MethodGetProperties
Get a clone of the properties of the provided element. In other words, a HashMap is created and filled with the key/values of the element's properties.
(Defined by ElementHelpers.)
Public Extension MethodHaveEqualIds
Simply tests if the element ids are equal().
(Defined by ElementHelpers.)
Public Extension MethodHaveEqualProperties
Determines whether two elements have the same properties. To be true, both must have the same property keys and respective values must be equals().
(Defined by ElementHelpers.)
Public Extension MethodSetProperties(IDictionaryString, Object)Overloaded.
Set the properties of the provided element using the provided dictionary.
(Defined by ElementHelpers.)
Public Extension MethodSetProperties(Object)Overloaded.
Set the properties of the provided element using the provided key value pairs. The var args of Objects must be divisible by 2. All odd elements in the array must be a string key.
(Defined by ElementHelpers.)
Public Extension MethodValidateProperty
Determines whether the property key/value for the specified element can be legally set. This is typically used as a pre-condition check prior to setting a property. Throws ArgumentException whether the triple is legal and if not, a clear reason message is provided
(Defined by ElementHelpers.)
Top
See Also