Skip to content

Dictionary

Dictionary is a class for storing and accessing data in a dictionary-like format.

构造方法

Dictionary.new ( keyType : K )
Constructor

成员变量

Dictionary.count : number
(Read-only) Number of elements in the dictionary.

成员方法

Dictionary.Get ( key : K|null ) : V|undefined
Returns the value associated with the specified key.
Dictionary.Set ( key : K|null , value : V ) : void
Set the value for the specified key.
Dictionary.Add ( key : K|null , value : V ) : void
Add a value to the specified key name.
Dictionary.Remove ( key : K|null ) : void
Remove the value with the specified key name.
Dictionary.Contains ( key : K|null ) : boolean
Whether the specified key is contained in the dictionary.
Dictionary.Clear ( ) : void
Clears the list of keys and the list of values for this object.
Dictionary.toString ( ) : string
Returns the name of the return type.
Dictionary.forEach ( callback : Callback ) : void
Iterate through a dictionary