Show / Hide Table of Contents

Class StringObjectDictionary

A StringObjectDictionary is a collection of key-value pairs. The key is a string and the value can be an integer, float, string, boolean or datetime.

Syntax

Constructors

StringObjectDictionary()

Initializes a new instance of the StringObjectDictionary class.

Declaration
StringObjectDictionary

Methods

getInteger(String)

Returns Integer value for key

Declaration
Integer getInteger(String key)
Parameters
Type Name Description
String key

The key to look up a value for

Returns
Type Description
Integer

The value for the given key.

Examples
StringObjectDictionary dict;
printLine(dict.getInteger("foobar").toString());

getFloat(String)

Returns Float value for key

Declaration
Float getFloat(String key)
Parameters
Type Name Description
String key

The key to look up a value for

Returns
Type Description
Float

The value for the given key.

Examples
StringObjectDictionary dict;
printLine(dict.getFloat("foobar").toString(2));

getString(String)

Returns String value for key

Declaration
String getFloat(String key)
Parameters
Type Name Description
String key

The key to look up a value for

Returns
Type Description
String

The value for the given key.

Examples
StringObjectDictionary dict;
printLine(dict.getString("foobar"));

getBool(String)

Returns boolean value for key

Declaration
Bool getBool(String key)
Parameters
Type Name Description
String key

The key to look up a value for

Returns
Type Description
Bool

The value for the given key.

Examples
StringObjectDictionary dict;
printLine(dict.getBool("foobar").toString());

getDateTime(String)

Returns value for key

Declaration
DateTime getDateTime(String key)
Parameters
Type Name Description
String key

The key to look up a value for

Returns
Type Description
DateTime

The value for the given key.

Examples
StringObjectDictionary dict;
printLine(dict.getDateTime("foobar").toString());

insertInteger(String,Integer)

Inserts or updates value for given key

Declaration
Void insertInteger(String key,Integer value)
Parameters
Type Name Description
String key

The key.

Integer value

The value for the given key.

Returns
Type Description
Void
Examples
StringObjectDictionary dict;
dict.insertInteger("foobar", 200);

insertFloat(String,Float)

Inserts or updates value for given key

Declaration
Void insertFloat(String key,Float value)
Parameters
Type Name Description
String key

The key.

Float value

The value for the given key.

Returns
Type Description
Void
Examples
StringObjectDictionary dict;
dict.insertFloat("foo", 2.0);

insertString(String,String)

Inserts or updates value for given key

Declaration
Void insertString(String key,String value)
Parameters
Type Name Description
String key

The key.

String value

The value for the given key.

Returns
Type Description
Void
Examples
StringObjectDictionary dict;
dict.insertString("foo", "bar");

insertBool(String,Bool)

Inserts or updates value for given key

Declaration
Void insertBool(String key,Bool value)
Parameters
Type Name Description
String key

The key.

Bool value

The value for the given key.

Returns
Type Description
Void
Examples
StringObjectDictionary dict;
dict.insertBool("foo", false);

insertDateTime(String,DateTime)

Inserts or updates value for given key

Declaration
Void insertDateTime(String key,DateTime value)
Parameters
Type Name Description
String key

The key.

DateTime value

The value for the given key.

Returns
Type Description
Void
Examples
StringObjectDictionary dict;
dict.insertDateTime("foo", getCurrentDateTime());
In This Article
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top