Class HashMap<KeyType, ValueType, HashCodeType>
Type Parameters
KeyType
ValueType
HashCodeType
Constructors
constructor
- new HashMap<KeyType, ValueType, HashCodeType>(_hash: Hash<KeyType, HashCodeType>): HashMap<KeyType, ValueType, HashCodeType>
Type Parameters
KeyType
ValueType
HashCodeType
Parameters
_hash: Hash<KeyType, HashCodeType>
Returns HashMap<KeyType, ValueType, HashCodeType>
Methods
entries
- entries(): IterableIterator<[KeyType, ValueType, HashCodeType]>
Returns IterableIterator<[KeyType, ValueType, HashCodeType]>
get
- get(key: KeyType, hashCode?: HashCodeType): undefined | ValueType
Parameters
key: KeyType
Optional hashCode: HashCodeType
Returns undefined | ValueType
getOrDefault
- getOrDefault(key: KeyType, defaultFactory: (() => ValueType)): undefined | ValueType
Parameters
key: KeyType
defaultFactory: (() => ValueType)
Returns undefined | ValueType
has
- has(key: KeyType, hashCode?: HashCodeType): boolean
Parameters
key: KeyType
Optional hashCode: HashCodeType
Returns boolean
keys
- keys(): IterableIterator<[KeyType, HashCodeType]>
Returns IterableIterator<[KeyType, HashCodeType]>
set
- set(key: KeyType, value: ValueType, hashCode?: HashCodeType): void
Parameters
key: KeyType
value: ValueType
Optional hashCode: HashCodeType
Returns void