BBjspHashMap::getTypeOf (Deprecated)

The BBJSP system is deprecated. For new development, use BBxServlet.

Description

In BBj 17.0 and higher, this method returns the data-type of the value bound to the key.

The types are as follows:

  • D - a Double

  • F - a Float

  • I - an Integer

  • C - a String

  • O - an Object

Syntax

Return Value

Method

char

getTypeOf(string key)

Parameters

Variable

Description

key

The name of the object.

Return Value

Returns the type of the object.

Remarks

None.

Example

declare BBjspHashMap map!

map! = BBjAPI().makeBBJSP().makeBBjspHashMap()

map!.setInt("int",123.44)
map!.setFloat("float",123.44)
map!.setDouble("double",123.44)
map!.setBoolean("float","FALSE")

vect! = map!.getKeys()
if vect!.size()
    for i = 0 to vect!.size()-1
        n$ = vect!.get(i)
        ? n$ + " = " + chr(map!.getTypeOf(n$)) + " : " + str(map!.get(n$))
    next i
endif

See Also

BBjspHashMap