BBjVector::getItem

Description

Retrieves an object from the vector.

Syntax

Return Value

Method

Object

getItem(int index)

Parameters

Variable

Description

index

Specifies the 0-based index at which the object will be retrieved from the vector.

Return Value

Retrieves the object at index.

Remarks

None.

Example

REM Get an item from 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 Get the value at the specified index, this returns the string "Item 4"
ITEM4$=STR(myVector!.getItem(3))

See Also

BBjAPI

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