BIM.works SDKs - v3.0.0-b.115
    Preparing search index...

    Class QidMap<V>

    QidMap represents a Set of mappings from Qid to some other object. It is like JavaScript Map, but specifically for keys of the Qid

    Type Parameters

    • V
    Index

    Constructors

    • Create a new QidMap

      Type Parameters

      • V

      Returns QidMap<V>

    • Create a new QidMap by providing an existing mapping

      Type Parameters

      • V

      Parameters

      • iterable: Iterable<[string | Qid | { oid: number; vid: string }, V]>

      Returns QidMap<V>

    Accessors

    • get keys(): Iterator<Qid, V, QidMap<V>>

      Returns Iterator<Qid, V, QidMap<V>>

    • get size(): number

      Returns number

      The amount of mappings in this QidMap

    Methods

    • Returns IterableIterator<[Qid, V]>

    • The clear() method of QidMap instances removes all Qid mappings from this map.

      Returns void

    • The delete() method of QidMap instances removes the specified Qid mapping from this map by qid.

      Parameters

      Returns boolean

    • Returns Iterator<Qid, V, QidMap<V>>

    • Parameters

      • callbackFn: (value: V, qid: Qid, set: QidSet) => boolean
      • OptionalthisArg: unknown

      Returns void

    • Parameters

      • qid: Qid

        The Qid to get the value for

      Returns V

      The linked object or null when there is no mapping for the Qid

    • Parameters

      • vid: string
      • oid: number

      Returns V

    • The has() method of QidMap instances returns a boolean indicating whether an element with the specified qid exists in this map or not.

      Parameters

      Returns boolean

    • The set() method of QidMap instances adds or updates an entry in this map with a specified Qid and a value.

      Parameters

      • qid: Qid

        The Qid for which to set the value

      • value: V

        The value to set

      Returns boolean

    • The setByVidOid() method of QidMap instances adds or updates an entry in this map with a specified Qid (given as Vid + Oid) and a value. This method should only be used when no Qid is available, and in those cases it will be slighly faster than first creating a Qid

      Parameters

      • vid: string

        The Vid for which to set the value

      • oid: number

        The Oid for which to set the value

      • value: V

        The value to set

      Returns boolean

    • Combine two QidMaps, when duplicate Qid entries exist in both QidMap, the values of other are used

      Parameters

      Returns QidMap<V>

      A new QidMap

    • Combine two QidMaps, when duplicate Qid entries exist in both QidMap, the values of other are used

      Parameters

      Returns QidMap<V>

      This QidMap, with the entries from other QidMap added (and overriding any keys of this)

    • Type Parameters

      • V

      Parameters

      • iterable: Iterable<[string | Qid | { oid: number; vid: string }, V]>

      Returns QidMap<V>