Class: Dictionary<K, V>
A type that represents a dictionary of keys to values. Similar to a Map in JavaScript.
Type Parameters
| Type Parameter | Description |
|---|---|
| The type of the keys in the dictionary. |
| The type of the values in the dictionary. |
Implements
Constructors
new Dictionary()
new Dictionary<
K,V>(keySchema:Schema<K>,valueSchema:Schema<V>,sizeSchema:Schema<number>):Dictionary<K,V>
Creates a new dictionary type.
Parameters
| Parameter | Type | Description |
|---|---|---|
|
| The schema for the keys in the dictionary. |
|
| The schema for the values in the dictionary. |
|
| The schema for the size of the dictionary. |
Returns
Dictionary<K, V>
Defined in
Methods
read()
read(
reader:ByteStreamReader):Map<K,V>
Parameters
| Parameter | Type |
|---|---|
|
Returns
Map<K, V>
Implementation of
Schema.read
Defined in
write()
write(
writer:ByteStreamWriter,value:Map<K,V>):void
Parameters
| Parameter | Type |
|---|---|
| |
|
|
Returns
void
Implementation of
Schema.write