IndexedList

Kind of class:class
Inherits from:none
Implements:
Version:1.0
Author:Francis Bourre
Classpath:com.bourre.data.collections.IndexedList
File last modified:Wednesday, 31 October 2007, 07:35:29

Constructor

IndexedList

function IndexedList (
)
List storing indexed objects

Usage : var a:IndexedList = new IndexedList();

Instance methods

getElements

function getElements (
) : Array
Get array copy of the list content.

Returns:
Boolean.

getIndex

function getIndex (
) : Number
Get index number of an object.

Usage : var n:Number = a.getIndex(o);
Parameters:
o:
Object to check.
Returns:
Number Returns -1 if the object isn't referenced in the list.

init

function init (
) : Void
Clear all list values.

Usage : var a.init();

isEmpty

function isEmpty (
) : Boolean
Check if Array's empty.

Usage : var b:Boolean = a.isEmpty();
Returns:
Boolean.

objectExists

function objectExists (
) : Boolean
Test if one object is referenced in the list.

Usage : var b:Boolean = a.objectExists(o);
Parameters:
o:
Object to check.
Returns:
Boolean.

push

function push (
) : Boolean
Add object.

Usage : a.push(o);
Parameters:
o:
Object to add.
Returns:
Boolean that indicates if the object has been successfully added == wasn't already there.

remove

function remove (
) : Boolean
Remove object.

Usage : a.remove(o);
Parameters:
o:
Object to remove.
Returns:
Boolean that indicates if the object has been found and was removed.

toString

function toString (
) : String
Returns the string representation of this instance.
Returns:
the string representation of this instance