Bona Iqiniso Application Board

V3BiPanelArray

Specification for V3BiPanelArray

Attributes

AttributeTypeDescription
_itemsV3BiPanelBase[]Private array of V3BiPanelBase items that the panel array manages.

Methods

MethodDescription
constructorInitializes a new instance of V3BiPanelArray with the provided array of items.
get itemsReturns the array of V3BiPanelBase items.
set itemsSets the array of V3BiPanelBase items.

Constructor

Signature:

constructor(items: V3BiPanelBase[])

Parameters:

  • items (V3BiPanelBase[]): Array of panel items.

Description:
The constructor initializes the V3BiPanelArray instance with the provided items array.

Method: get items

Signature:

get items(): V3BiPanelBase[]

Description:
Returns the array of V3BiPanelBase items.

Method: set items

Signature:

set items(value: V3BiPanelBase[])

Parameters:

  • value (V3BiPanelBase[]): The array of panel items to set.

Description:
Sets the array of V3BiPanelBase items.

Example Usage

const panels = [
  new V3BiPanelBase('panel1'),
  new V3BiPanelBase('panel2')
];
const panelArray = new V3BiPanelArray(panels);
console.log(panelArray.items); // Output: [V3BiPanelBase, V3BiPanelBase]
panelArray.items = [new V3BiPanelBase('panel3')];
console.log(panelArray.items); // Output: [V3BiPanelBase]

Scenario Table

ScenarioGivenWhenThen
Create an instance with a non-empty arrayThe items array contains valid V3BiPanelBase itemsI create a new V3BiPanelArray with the items arrayThe instance should be created with the _items attribute containing the items array.
Create an instance with an empty arrayThe items array is emptyI create a new V3BiPanelArray with the items arrayThe instance should be created with the _items attribute as an empty array.
Get items should return the correct arrayThe items array contains valid V3BiPanelBase itemsI access the items getterThe correct array of V3BiPanelBase items should be returned.
Set items should update the arrayThe items array contains valid V3BiPanelBase itemsI update the items using the setterThe _items attribute should be updated with the new array of V3BiPanelBase items.
Set items should handle an empty arrayThe items array is currently non-emptyI update the items with an empty array using the setterThe _items attribute should be updated to an empty array.

Overview Table

AttributeTypeDescription
_itemsV3BiPanelBase[]Private array of V3BiPanelBase items that the panel array manages.
MethodDescription
constructorInitializes a new instance of V3BiPanelArray with the provided array of items.
get itemsReturns the array of V3BiPanelBase items.
set itemsSets the array of V3BiPanelBase items.

This setup ensures that the V3BiPanelArray class is correctly instantiated and that its methods function as expected under various scenarios.