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 |
Summary
Constructor
Instance methods
Constructor
IndexedList
function IndexedList (
)
List storing indexed objects
Usage : var a:IndexedList = new IndexedList();
Usage : var a:IndexedList = new IndexedList();
Instance methods
getElements
function getElements (
) : Array
Get array copy of the list content.
Returns:
Boolean.
Specified by:
getIndex
function getIndex (
) : Number
Get index number of an object.
Usage : var n:Number = a.getIndex(o);
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.
Specified by:
init
function init (
) : Void
Clear all list values.
Usage : var a.init();
Usage : var a.init();
Specified by:
isEmpty
function isEmpty (
) : Boolean
Check if Array's empty.
Usage : var b:Boolean = a.isEmpty();
Usage : var b:Boolean = a.isEmpty();
Returns:
Boolean.
Specified by:
objectExists
function objectExists (
) : Boolean
Test if one object is referenced in the list.
Usage : var b:Boolean = a.objectExists(o);
Usage : var b:Boolean = a.objectExists(o);
push
function push (
) : Boolean
Add object.
Usage : a.push(o);
Usage : a.push(o);
Parameters:
o:
Object to add.
Returns:
Boolean that indicates if the object has been successfully added == wasn't already there.
Specified by:
remove
function remove (
) : Boolean
Remove object.
Usage : a.remove(o);
Usage : a.remove(o);
Parameters:
o:
Object to remove.
Returns:
Boolean that indicates if the object has been found and was removed.
Specified by:
toString
function toString (
) : String
Returns the string representation of this instance.
Returns:
the string representation of this instance