Packagestarling.utils
Classpublic class VectorUtil
InheritanceVectorUtil Inheritance Object

A utility class containing methods related to the Vector class.

Many methods of the Vector class cause the creation of temporary objects, which is problematic for any code that repeats very often. The utility methods in this class can be used to avoid that.



Public Methods
 MethodDefined By
  
insertIntAt(vector:Vector.<int>, index:int, value:int):void
[static] Inserts a value into the 'int'-Vector at the specified index.
VectorUtil
  
insertNumberAt(vector:Vector.<Number>, index:int, value:Number):void
[static] Inserts a value into the 'Number'-Vector at the specified index.
VectorUtil
  
insertUnsignedIntAt(vector:Vector.<uint>, index:int, value:uint):void
[static] Inserts a value into the 'uint'-Vector at the specified index.
VectorUtil
  
removeIntAt(vector:Vector.<int>, index:int):int
[static] Removes the value at the specified index from the 'int'-Vector.
VectorUtil
  
removeNumberAt(vector:Vector.<Number>, index:int):Number
[static] Removes the value at the specified index from the 'Number'-Vector.
VectorUtil
  
removeUnsignedIntAt(vector:Vector.<uint>, index:int):uint
[static] Removes the value at the specified index from the 'int'-Vector.
VectorUtil
Method Detail
insertIntAt()method
public static function insertIntAt(vector:Vector.<int>, index:int, value:int):void

Inserts a value into the 'int'-Vector at the specified index. Supports negative indices (counting from the end); gaps will be filled up with zeroes.

Parameters

vector:Vector.<int>
 
index:int
 
value:int

insertNumberAt()method 
public static function insertNumberAt(vector:Vector.<Number>, index:int, value:Number):void

Inserts a value into the 'Number'-Vector at the specified index. Supports negative indices (counting from the end); gaps will be filled up with NaN values.

Parameters

vector:Vector.<Number>
 
index:int
 
value:Number

insertUnsignedIntAt()method 
public static function insertUnsignedIntAt(vector:Vector.<uint>, index:int, value:uint):void

Inserts a value into the 'uint'-Vector at the specified index. Supports negative indices (counting from the end); gaps will be filled up with zeroes.

Parameters

vector:Vector.<uint>
 
index:int
 
value:uint

removeIntAt()method 
public static function removeIntAt(vector:Vector.<int>, index:int):int

Removes the value at the specified index from the 'int'-Vector. Pass a negative index to specify a position relative to the end of the vector.

Parameters

vector:Vector.<int>
 
index:int

Returns
int
removeNumberAt()method 
public static function removeNumberAt(vector:Vector.<Number>, index:int):Number

Removes the value at the specified index from the 'Number'-Vector. Pass a negative index to specify a position relative to the end of the vector.

Parameters

vector:Vector.<Number>
 
index:int

Returns
Number
removeUnsignedIntAt()method 
public static function removeUnsignedIntAt(vector:Vector.<uint>, index:int):uint

Removes the value at the specified index from the 'int'-Vector. Pass a negative index to specify a position relative to the end of the vector.

Parameters

vector:Vector.<uint>
 
index:int

Returns
uint