Class org.aswing.utils.Vector

Implemented Interfaces

IVector

Description

Field Index

CASEINSENSITIVE, DESCENDING, NUMERIC, RETURNINDEXEDARRAY, UNIQUESORT

Method Index

new Vector()
append(), appendAll(), clear(), clone(), contains(), each(), eachWithout(), elementAt(), first(), get(), getSize(), indexOf(), isEmpty(), last(), remove(), removeAt(), removeRange(), replaceAt(), setElementAt(), size(), sort(), sortOn(), toArray(), toString()

Constructor Detail

Vector

public function Vector()

Field Detail

CASEINSENSITIVE

static public CASEINSENSITIVE:Number

DESCENDING

static public DESCENDING:Number

UNIQUESORT

static public UNIQUESORT:Number

RETURNINDEXEDARRAY

static public RETURNINDEXEDARRAY:Number

NUMERIC

static public NUMERIC:Number

Method Detail

each

public function each(operation:Function):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);
     });
 
 

Parameters

operationthe operation function for each element

eachWithout

public function eachWithout(obj:Object, operation:Function):Void

Call the operation by pass each element once without the specified element.

for example:

 //hide all component in vector components without firstOne component
 var firstOne:Component = the first one;
 components.eachWithout( 
 	   firstOne,
     function(c:Component){
         c.setVisible(false);
     });
 
 

Parameters

objthe which will not be operated.
operationthe operation function for each element

get

public function get(i:Number):Object

elementAt

public function elementAt(i:Number):Object

append

public function append(obj:Object, index:Number):Void

appendAll

public function appendAll(arr:Array, index:Number):Void

replaceAt

public function replaceAt(index:Number, obj:Object):Object

removeAt

public function removeAt(index:Number):Object

remove

public function remove(obj:Object):Object

removeRange

public function removeRange(fromIndex:Number, toIndex:Number):Array

Removes from this List all of the elements whose index is between fromIndex, inclusive and toIndex, exclusive. Shifts any succeeding elements to the left (reduces their index). This call shortens the ArrayList by (toIndex - fromIndex) elements. (If toIndex==fromIndex, this operation has no effect.)

Return

the elements were removed from the vector

Specified By

removeRange() in org.aswing.utils.IVector

indexOf

public function indexOf(obj:Object):Number

contains

public function contains(obj:Object):Boolean

first

public function first():Object

last

public function last():Object

size

public function size():Number

setElementAt

public function setElementAt(index:Number, element:Object):Void

getSize

public function getSize():Number

clear

public function clear():Void

sort

public function sort(compare:Object, options:Number):Array

sortOn

public function sortOn(key:Object, options:Number):Array

toString

public function toString(Void):String

clone

public function clone(Void):Vector

isEmpty

public function isEmpty():Boolean

toArray

public function toArray():Array