# Class: CoordMap<T>

# Type parameters

Name
T

# Constructors

# constructor

new CoordMap<T>(props?)

# Type parameters

Name
T

# Parameters

Name Type
props? Object
props.defaultValue? T

# Defined in

packages/utils/src/CoordMap.ts:40

# Properties

# defaultValue

Optional defaultValue: T

# Defined in

packages/utils/src/CoordMap.ts:38


# map

map: Map<number, T>

# Defined in

packages/utils/src/CoordMap.ts:37

# Accessors

# size

get size(): number

# Returns

number

# Defined in

packages/utils/src/CoordMap.ts:103

# Methods

# clear

clear(): void

# Returns

void

# Defined in

packages/utils/src/CoordMap.ts:97


# coords

coords(): IterableIterator<Coord>

# Returns

IterableIterator<Coord>

# Defined in

packages/utils/src/CoordMap.ts:72


# delete

delete(coord): boolean

# Parameters

Name Type
coord Coord

# Returns

boolean

# Defined in

packages/utils/src/CoordMap.ts:89


# entries

entries(): IterableIterator<[number, T]>

# Returns

IterableIterator<[number, T]>

# Defined in

packages/utils/src/CoordMap.ts:76


# get

get(coord): undefined | T

# Parameters

Name Type
coord Coord

# Returns

undefined | T

# Defined in

packages/utils/src/CoordMap.ts:64


# has

has(coord): boolean

# Parameters

Name Type
coord Coord

# Returns

boolean

# Defined in

packages/utils/src/CoordMap.ts:93


# keys

keys(): IterableIterator<number>

# Returns

IterableIterator<number>

# Defined in

packages/utils/src/CoordMap.ts:68


# set

set(coord, value): Map<number, T>

# Parameters

Name Type
coord Coord
value T

# Returns

Map<number, T>

# Defined in

packages/utils/src/CoordMap.ts:52


# toArray

toArray(): [Coord, T][]

# Returns

[Coord, T][]

# Defined in

packages/utils/src/CoordMap.ts:80


# values

values(): IterableIterator<T>

# Returns

IterableIterator<T>

# Defined in

packages/utils/src/CoordMap.ts:85


# from

Static from<T>(coordMapLike): CoordMap<T>

# Type parameters

Name
T

# Parameters

Name Type
coordMapLike Object
coordMapLike.defaultValue? T
coordMapLike.map Map<number, T>

# Returns

CoordMap<T>

# Defined in

packages/utils/src/CoordMap.ts:45