Index

Classes

Class

Methods

Class Banana.Util.ArrayUniCollection


Defined in: ArrayUniCollection.js.

Class Detail
Banana.Util.ArrayUniCollection()

Array uni collection is a wrapper class maintaining quick access to data from index and vica versa. Use this class if have arrays with non numeric indices and quick index lookup

Method Detail
addItem(key, item)

Adds new item to the collection. Key in string or int format.

Parameters:
{String} key
{mixed} item
alterItem(key, value)

Modifies item. Only if key already exists

Parameters:
{String} key
{mixed} value

Clones the collection

Returns:
{Banana.Util.ArrayBiCollection}
each(f, userdata)

Walks over the collection

Parameters:
{Function} f
{mixed} userdata
{Array} getArray()

gets indexed array with elements containing the data

Returns:
{Array}
{mixed} getItem(key)

Gets data by key

Parameters:
{String} key
Returns:
{mixed}
{mixed} getItemByIndex(index)

Gets item by index

Parameters:
{int} index
Returns:
{mixed}
{String} getKeyByIndex(index)

Gets key by index

Parameters:
{int} index
Returns:
{String}
{int} getLength()

gets length of the collection

Returns:
{int}
{boolean} isset(key)

checks if given key exists in the collection

Parameters:
{String} key
Returns:
{boolean} true if found
removeByIndex(index)

Removes item by index

Parameters:
{int} index

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Dec 05 2012 22:02:05 GMT+0100 (CET)