Interface AttributeListModel<K, T>

A list object of attributes commonly specified for nodes, subgraphs, and edges under graph and subgraph.

interface AttributeListModel<K, T> {
    $$kind: K;
    $$type: "AttributeList";
    comment?: string;
    size: number;
    values: readonly [T, Attribute<T>][];
    apply(attributes): void;
    clear(): void;
    delete(key): void;
    get<K>(key): undefined | Attribute<K>;
    set<K>(key, value): void;
}

Type Parameters

Hierarchy (view full)

Properties

$$kind: K
$$type: "AttributeList"

The type of the DotObjectType.

comment?: string

Comments to include when outputting with toDot.

size: number

Size of the set of keys and values held by the DOT object.

values: readonly [T, Attribute<T>][]

The key/value tuples of the object attributes.

Methods

  • Delete the value of an attribute from a DOT object by specifying a key.

    Parameters

    • key: T

    Returns void

  • Get the value of an attribute by a DOT object by specifying its key.

    If the value corresponding to the key does not exist, undefined is returned.

    Type Parameters

    Parameters

    • key: K

    Returns undefined | Attribute<K>

Generated using TypeDoc