BBjVector::setItem

Description

Set the value of an existing item in the vector.

Syntax

Return Value

Method

void

setItem(int index, Object item!)

Parameters

Variable

Description

index

Specifies the 0-based index at which the item is set.

item!

Specifies the object to be set in the vector.

Return Value

None.

Remarks

None.

Example

rem 'Set an item in a BBjVector object

rem 'Obtain the instance of the BBjAPI object
let myAPI! = BBjAPI()

rem 'Create an instance of the BBjVector object
let myVector! = myAPI!.makeVector()

rem 'Create values to add into the BBjVector object
A! = new java.lang.Integer(1)
A = 2
B! = new java.lang.String("Item 3")
B$ = "Item 4"

rem 'Add the above values into the BBjVector object
myVector!.addItem(A!)
myVector!.addItem(A)
myVector!.addItem(B!)
myVector!.addItem(B$)

rem 'Replace the value of the third item of the list
myVector!.setItem(2,"This is Item 3")

rem 'Get the value at the specified index, this returns the Java String "This is Item 3"
ITEM1! = myVector!.getItem(2)

See Also

BBjAPI

Object Variables

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.