Index

Classes

Class

Methods

Class Banana.Util.ArrayBiCollection


Defined in: ArrayBiCollection.js.

Class Detail
Banana.Util.ArrayBiCollection()

Array bi collection is a wrapper class holding two Banana.Util.ArrayUniCollection In one we keep track of key -> index. In the other key -> data.

Method Detail
addItem(key, item)

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

Parameters:
{String} key
{mixed} item
clear()

clears the collection

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}
{int} getIndex(key)

gets index by key

Parameters:
{String} key
Returns:
{int}
{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
remove(key)

Removes item by key

Parameters:
{String} key
sort(fn)

sorts the collection

Parameters:
{Function} fn

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