BBjspHashMap

Description

In BBj 20.10, this class has been renamed from BBjHashMap to BBjspHashMap to clarify that it must only be used within the context of the BBJSP subsystem.

In BBj 16.0 and higher, this class provides a Map that can be used to store BBj data types and supports coercion to other types. This class is an extension of the standard java.util.HashMap class, and provides a set of helper methods that manage the conversion of the primitive types to the appropriate wrapper class automatically.

Creation

This object is created with the new operator.

Methods of BBjspHashMap

Return Value

Method

void

add(string key, Object val)

boolean

containsKey(Object key)

Boolean

getBoolean(string key)

Date

getDate(string key)

Double

getDouble(string key)

Float

getFloat(string key)

Integer

getInt(string key)

BBjVector

getKeys()

Long

getLong(string key)

Object

getObject(string key)

Short

getShort(string key)

string

getString(string key)

char

getTypeOf(string key)

Object

put(string key, Object val)

void

setBoolean(string key, Object val)

void

setDate(string key, Date val)

void

setDouble(string key, Object val)

void

setFloat(string key, Object val)

void

setInt(string key, Object val)

void

setLong(string key, Object val)

void

setObject(string key, Object val)

void

setShort(string key, Object val)

void

setString(string key, Object val)

Remarks

This is part of the BBJSP subsystem, and must not be used in any other context.

Constants

Example

declare BBjspHashMap map!
map! = new BBjspHashMap()
map!.put("NUMBER",1.23)
map!.put("STRING","A String")
print map!.getDouble("NUMBER")
print map!.getTypeOf("STRING")
print map!