BBjVector::removeItem

Description

Removes an object from the vector.

Syntax

Return Value

Method

Object

removeItem(int index)

Parameters

Variable

Description

index

Specifies the 0-based index of the object being removed from the vector.

Return Value

Returns the removed Object.

Remarks

Each object in the vector with an index greater than the removed object's index is shifted downward to have an index one smaller than the value it had previously.

Example

rem 'Remove 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 'Remove the value at the specified index, this retruns "Item 4"
ITEM4$ = STR(myVector!.removeItem(3))

See Also

BBjAPI

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