EMAPI.ArrayObjects

Assistant class for managing the JavaScript objects array.

Summary
EMAPI.ArrayObjectsAssistant class for managing the JavaScript objects array.
Functions
EMAPI.ArrayObjectsA constructor of a new instance of EMAPI.ArrayObjects class..
destroyDestroys an object of EMAPI.ArrayObjects class.
addItemAdds a new item at the end of the array.
insertItemInserts a new item to the array.
setItemChanges the value of the item in the array.
removeItemDeletes the item from the array.
removeItemsRemoves all items from the array
moveItemChanges position of element in array.
itemReturns object located in the given position of array.
countZwraca Return number of object located in array.

Functions

EMAPI.ArrayObjects

A constructor of a new instance of EMAPI.ArrayObjects class..

Parameters

objectType{String} Full name of objects stored in the array.
options{Object} An object with additional parameters of class instance.

destroy

destroy: function()

Destroys an object of EMAPI.ArrayObjects class.

addItem

addItem: function (options)

Adds a new item at the end of the array.

Parameters

options{Object} An object with additional added items parameters.

insertItem

insertItem: function(options,
index)

Inserts a new item to the array.

Parameters

options{Object} An object with additional added items parameters.
index{Integer} The position of added item, 0 means inserting at the beginning of the array.

setItem

setItem: function(options,
index)

Changes the value of the item in the array.

Parameters

options{Object} The object with the item’s parameters.
index{Integer} The position of changed item, 0 means the beginning of the array.

removeItem

removeItem: function(index)

Deletes the item from the array.

Parameters

index{Integer} The position of deleted item, 0 means the beginning of the array.

removeItems

removeItems: function (destroy)

Removes all items from the array

Parameters

index{Boolean} Option of destroying removed objects.

moveItem

moveItem: function (from,
to)

Changes position of element in array.

Parameters

from{Integer} Position of shifted element, 0 means beginning of array.
to{Integer} New position of shifted element, 0 means beginning of array.

item

item: function(i)

Returns object located in the given position of array.

Parameters

i{Integer} Position of element.

Result

{Object} Element of array.

count

count : function()

Zwraca Return number of object located in array.

Result

{Integer} Number of array elements.

destroy: function()
Destroys an object of EMAPI.ArrayObjects class.
addItem: function (options)
Adds a new item at the end of the array.
insertItem: function(options,
index)
Inserts a new item to the array.
setItem: function(options,
index)
Changes the value of the item in the array.
removeItem: function(index)
Deletes the item from the array.
removeItems: function (destroy)
Removes all items from the array
moveItem: function (from,
to)
Changes position of element in array.
item: function(i)
Returns object located in the given position of array.
count : function()
Zwraca Return number of object located in array.
Close