dictionary class

Description

Represents a collection of keys and values.

Notes

This class is a standard built-in class in the Rice language.

Instance that is created by declaration have been already initialized.

key is the string type.

You can limit the type of the value by using the "{}" in the declaration.

If do not use the "{}" in the declaration, will be able to have an instance of any type as a value.

fitter

SignatureDescription
dictionary()

Get an instance with initial value.

dictionary(string)

Gets an instance initialized by the initialization string.

dictionary{bool}(string)

Gets an instance initialized by the initialization string.

dictionary{int}(string)

Gets an instance initialized by the initialization string.

dictionary{long}(string)

Gets an instance initialized by the initialization string.

dictionary{real}(string)

Gets an instance initialized by the initialization string.

dictionary{string}(string)

Gets an instance initialized by the initialization string.

getter

SignatureDescription
Count

Gets the number of key/value pairs that contained in the dictionary.

Fitted

Gets the value that indicates whether this instance was already initialized.

TypeName

Gets the type name.

Direct call

Gets the value using the getter call notation for Rice.

setter

SignatureDescription
direct call

Sets the value using the setter call notation for Rice.

method

SignatureDescription
Add(string,class)

Adds the specified key and value to the dictionary.

Clear()

Removes all keys and values from the dictionary.

Copy()

Gets a copy of the caller dictionary.

ContainsKey(string)

Gets a value that indicates whether the specified key is contained in the dictionary.

Get(string)

Gets the value that associated with the specified key.

Keys()

Gets a list of the keys in the dictionary.

Remove(string)

Removes the value with the specified key.

Set(string,class)

Sets the value that associated with the specified key.

SortByKey(bool)

Gets a new dictionary which the caller dictionary is sorted by key.

SortByValue(bool)

Gets a new dictionary which the caller dictionary is sorted by value.

Values()

Gets a list of the values in the dictionary.

Copyright © Rice All rights reserved.