class jive.Collection<T> extends EventDispatcher

collection class with events support

Instance Fields

Show inherited public instance fieldsHide inherited public instance fields

Inherited from EventDispatcher

function addEventListener(type:String, listener:Dynamic ->Void?useCapture:Bool, ?priority:Int, ?useWeakReference:Bool):Void
function dispatchEvent(event:Event):Bool
function hasEventListener(type:String):Bool
function removeEventListener(type:String, listener:Dynamic ->Void?useCapture:Bool):Void
function toString():String
function willTrigger(type:String):Bool

var length:Int

collection elements count

function new(): Void

function add(element:T, ?index:Int): Void

add element to collection

element

element to add

index

position to add. If 'index<0' element would be added to the end

function get(index:Int): T

get element at index

index

position of element, if there is no element returns null (or should throw exception)

function remove(?element:T): Void

remove element from collection

element

element to remove. If it is 'null' all elements would be removed.