Provides a way to define a mapping from a collection of items to a common value for each item for usage in conjunction with class LayoutData<TNode,TEdge,TNodeLabel,TEdgeLabel>.
Inheritance Hierarchy
ItemCollectionMapping
Remarks
This class supports LayoutData<TNode,TEdge,TNodeLabel,TEdgeLabel> implementations and does not usually have to be instantiated by client code explicitly. Instances of this class are properties of concrete LayoutData<TNode,TEdge,TNodeLabel,TEdgeLabel> implementations.
This class cannot be instantiated
Type Parameters
- TItem
- The type of the items that are mapped.
- TValue
- The type of the values the items are mapped to.
Type Details
- yFiles module
- algorithms
Methods
Adds the specified value which will be associated with all items in the returned item collection.
Remarks
Use the returned ItemCollection<TItem> to conveniently specify the items which should be mapped to the specified collection value.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- collectionValue - TValue
- The value the items of the returned collection are mapped to.
Returns
- ↪ItemCollection<TItem>
- The items that are mapped to the given value.
Clears all mappings that were defined using add.