Update map

This commit is contained in:
Bill 2021-07-24 23:26:55 -04:00
parent 368ed8b404
commit 3c78e86609

View File

@ -7,12 +7,14 @@ export class AdvancedMap<T, U> implements IDisposable
private _array: U[]; private _array: U[];
private _keys: T[]; private _keys: T[];
constructor() constructor(map: Map<T, U> = null)
{ {
this._length = 0; this._length = 0;
this._dictionary = new Map(); this._dictionary = new Map();
this._array = []; this._array = [];
this._keys = []; this._keys = [];
if(map) for(const [ key, value ] of map.entries()) this.add(key, value);
} }
public get length(): number public get length(): number