C

ValueDataKey<TValue>

This class is used as look-up key for registering a single value with a graph.
Inheritance Hierarchy

Remarks

A value for the key can be registered for the graph with method addData. If the type is a class type, the data can be retrieved from the graph via method getData. In case the type is a value type (struct), then method getNullableData should be used instead.

Type Parameters

TValue

The type value that is registered with this look-up key.

See Also

API

addData, getData, getNullableData, remove, ValueDataKey

Members

Show:

Constructors

Initializes a new instance of the ValueDataKey<TValue> class.

Parameters

id?: string
The unique identifier for this key. The id should be a combination of the namespace, class name, possible inner classes, and the field name of the ValueDataKey<TValue> instance, to ensure uniqueness. For example, if this ValueDataKey<TValue> instance is declared in the namespace 'yWorks.Layout.Organic' within the class 'OrganicLayout' with the field name 'ClusterIdDataKey', the id could be 'yWorks.Layout.Organic.OrganicLayout.ClusterIdDataKey'. If omitted, the key object itself is the identifier.

Properties

Gets the unique identifier for this key or null if none was specified.
readonlyfinal

Property Value

The unique identifier for this key or null if none was specified.

Defined in

DataKey.id

Methods

Determines whether the specified Object is equal to this instance.

Parameters

obj: any
The Object to compare with this instance.

Return Value

boolean
true if the specified Object is equal to this instance; otherwise, false.

Defined in

DataKey.equals
Returns a hash code for this instance.

Return Value

number
A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
Returns whether this key is equal to the specified other.
protectedfinal

Parameters

other: DataKey<TValue>
The other key to compare with this instance.

Return Value

boolean
true if the specified key is equal to this instance; otherwise, false.