Options
Menu

Class DomainUserIdMap<V>

The DomainUserIdMap is a utility class that will uniquely map a set of Convergence Domain User Ids to values.

Type parameters

  • V

Hierarchy

  • DomainUserIdMap

Index

Constructors

constructor

Methods

delete

  • Removes a user from the map.

    Parameters

    Returns void

entries

  • Returns [DomainUserId, V][]

    All mappings in the map as tuples. Each tuple is represented by and array in the format of [key, value].

forEach

  • forEach(callback: (value: V, userId: DomainUserId) => void): void
  • Allows consumers to iterate of the maps (key, value) pairs.

    Parameters

    Returns void

get

  • Gets the current value for the given user.

    Parameters

    Returns V | undefined

    The value mapped to for the supplied user, or undefined if the user does not exist in the map.

has

  • Determines if the map contains a particular domain user.

    Parameters

    Returns boolean

    True if the user is in the map, false otherwise.

keys

set

  • Sets a mapping between a user and a value in the map.

    Parameters

    Returns void

size

  • size(): number
  • Returns number

    The number of users contained in the map.

toGuidObjectMap

  • toGuidObjectMap(): {}
  • Returns this user id mapping as a plain JavaScript Object using the DomainUserId's guidas the map key.

    Returns {}

    • [key: string]: V

fromGuidObjectMap

  • Creates a new DomainUserIdMap from a plan JavaScript object whose keys are DomainUserId guid's.

    Type parameters

    • V

    Parameters

    • map: {}

      The guid mapping.

      • [key: string]: V

    Returns DomainUserIdMap<V>

    The JavaScript object map converted to a DomainUserIdMap.

of

  • Creates a new DomainUserIdMap from a source. If the soruce is a Map whose keys are strings, the strings will be assumed to be normal usernames and will be converted into DomainUserIds using the DomainUserIds.normal() method.

    Type parameters

    • V

    Parameters

    Returns DomainUserIdMap<V>

    A new DomainUserIdMap object.