class org.aswing.util.ArrayList
Sub classes | ||||
Stack |
|
ArrayList, a List implemented based on Array
@author firdosh @author paling
Class Fields
Instance Fields
function append(obj:Dynamic, ?index:Int = -1): Void
Append the object to the ArrayList
obj | the object to append |
index | where to append, if omited, appedn to the last position. |
function each(operation:Dynamic ->Void): Void
Call the operation by pass each element once.
for example:
//hide all component in vector components components.each( function(c:Component){ c.setVisible(false); });
operation | the operation function for each element |
function eachWithout(obj:Dynamic, operation:Dynamic ->Void): Void
Call the operation by pass each element once without the specified element.
for example:
//hide all component in list components without firstOne component var firstOne:Component = the first one; components.eachWithout(firstOne,
function(c:Component){ c.setVisible(false); });
obj | the which will not be operated. |
operation | the operation function for each element |
function removeRange(fromIndex:Int, toIndex:Int): Array<Dynamic>
Removes from this List all of the elements whose index is between fromIndex, inclusive and toIndex inclusive. Shifts any succeeding elements to the left (reduces their index). This call shortens the ArrayList by (toIndex - fromIndex) elements. (If toIndex less than fromIndex, this operation has no effect.)
returns | the elements were removed from the vector |
function subArray(startIndex:Int, length:Int): Array<Dynamic>
Returns a array that contains elements start with startIndex and has length elements.
startIndex | the element started index(include) |
length | length of the elements, if there is not enough elements left, return the elements ended to the end of the vector. |