Packageaway3d.graphs
Classpublic class VectorIterator
InheritanceVectorIterator Inheritance flash.events.EventDispatcher
Implements IIterator



Public Methods
 MethodDefined By
  
VectorIterator(vector:Vector.<Object>)
VectorIterator
  
VectorIterator
  
next():Object
Traverses through the tree externally and returns the first newly encountered node.
VectorIterator
  
nextWith(predicate:Function):Object
VectorIterator
  
performMethod(method:Function):void
Traverses through the tree internally and applies the supplied function to each node
VectorIterator
  
performMethodAsync(method:Function, maxTimeOut:Number = 500):void
Traverses through the tree and applies the supplied function to each node in the tree asynchronously.
VectorIterator
  
reset():Object
Resets the traversal for the tree.
VectorIterator
  
resetWith(predicate:Function):Object
VectorIterator
Constructor Detail
VectorIterator()Constructor
public function VectorIterator(vector:Vector.<Object>)



Parameters
vector:Vector.<Object>
####INIT####
Method Detail
cancelAsyncTraversal()method
public function cancelAsyncTraversal():void

next()method 
public function next():Object

Traverses through the tree externally and returns the first newly encountered node. The order does not depend on camera position etc.

Returns
Object — The next unvisited node in the tree.
nextWith()method 
public function nextWith(predicate:Function):Object

Parameters

predicate:Function

Returns
Object
performMethod()method 
public function performMethod(method:Function):void

Traverses through the tree internally and applies the supplied function to each node

Parameters

method:Function — The function to be applied to each node. It must have the following signature: function someFunction(node : ITreeNode) : void.

performMethodAsync()method 
public function performMethodAsync(method:Function, maxTimeOut:Number = 500):void

Traverses through the tree and applies the supplied function to each node in the tree asynchronously. The TreeIterator instance will dispatch IteratorEvent.ASYNC_ITERATION_COMPLETE when done.

Parameters

method:Function — The function to be applied to each node. It must have the following signature: function someFunction(node : ITreeNode) : void.
 
maxTimeOut:Number (default = 500) — The maximum timeout in milliseconds.

reset()method 
public function reset():Object

Resets the traversal for the tree.

Returns
Object — The root node of the tree, where traversal begins
resetWith()method 
public function resetWith(predicate:Function):Object

Parameters

predicate:Function

Returns
Object