BBjspHashMap::setString

Description

In BBj 16.0 and higher, this method adds a String to the map.

This method will coerce the given object to a String, allowing you to store an floating-point or boolean value as a String.

Syntax

Return Value

Method

void

setString(string key, Object val)

Parameters

Variable

Description

key

The key.

val

A String object.

Return Value

None.

Remarks

None.

Example

declare BBjspHashMap map!

map! = new BBjspHashMap()

map!.setString("S1","A String")
map!.setString("S2",1.23)
map!.setString("S3",new Float(1.23))
map!.setString("S4",BBjAPI().FALSE)

print map!

See Also

BBjspHashMap

BBjspHashMap::getString()