Packagecom.yworks.yfiles.util
Classpublic class Cursors
InheritanceCursors Inheritance YObject Inheritance Object

Provides utility methods for working with cursors (com.yworks.yfiles.base.YCursor) and iterators (com.yworks.bridge.util.Iterator).

See also

cursors
iterators


Public Methods
 MethodDefined By
  
Cursors(init:Boolean = true)
Cursors
  
[static] Creates a new cursor that provides a logical view on the concatenation of the two given cursors.
Cursors
  
[static] Creates a YCursor view of the given collection.
Cursors
  
[static] Creates a cursor view of the given collection.
Cursors
  
[static] Creates a first-to-last Iterator view of the given cursor.
Cursors
  
[static] Creates a cursor view of the given collection.
Cursors
  
[static] Creates a last-to-first Iterator view of the given cursor.
Cursors
 Inherited
equals(o:Object):Boolean
YObject
  
getClass():Class
[override]
Cursors
 Inherited
hashCode():int
YObject
  
toArray(cursor:YCursor, dest:Vector.<Object>):Vector.<Object>
[static] Creates or fills an array with the values provided by the cursor
Cursors
Constructor Detail
Cursors()Constructor
public function Cursors(init:Boolean = true)



Parameters
init:Boolean (default = true)
Method Detail
concatenate()method
public static function concatenate(c1:YCursor, c2:YCursor):YCursor

Creates a new cursor that provides a logical view on the concatenation of the two given cursors.

Parameters

c1:YCursor — - first concatenation argument
 
c2:YCursor — - second concatenation argument

Returns
YCursor
createCursor()method 
public static function createCursor(c:Collection):YCursor

Creates a YCursor view of the given collection.

Note that the returned cursor does not support the prev (com.yworks.yfiles.base.YCursor.prev()) and toLast (com.yworks.yfiles.base.YCursor.toLast()) operations.

Parameters

c:Collection — The collection.

Returns
YCursor — The cursor view of the given collection.

See also

createEdgeCursor()method 
public static function createEdgeCursor(c:Collection):EdgeCursor

Creates a cursor view of the given collection.

Note that the returned cursor does not support the operations prev (com.yworks.yfiles.base.YCursor.prev()), toLast (com.yworks.yfiles.base.YCursor.toLast()), and com.yworks.yfiles.base.EdgeCursor.cyclicPrev().

Parameters

c:Collection — The collection.

Returns
EdgeCursor — an com.yworks.yfiles.base.EdgeCursor view of the given collection.

See also

createIterator()method 
public static function createIterator(cursor:YCursor):Iterator

Creates a first-to-last Iterator view of the given cursor.

Note that the returned iterator does not support the remove (com.yworks.bridge.util.Iterator.removeItem()) operation.

Parameters

cursor:YCursor — The cursor.

Returns
Iterator — The iterator view of the given cursor.

See also

createNodeCursor()method 
public static function createNodeCursor(c:Collection):NodeCursor

Creates a cursor view of the given collection.

Note that the returned cursor does not support the operations prev (com.yworks.yfiles.base.YCursor.prev()), toLast (com.yworks.yfiles.base.YCursor.toLast()), and com.yworks.yfiles.base.NodeCursor.cyclicPrev().

Parameters

c:Collection — The collection.

Returns
NodeCursor — an com.yworks.yfiles.base.NodeCursor view of the given collection.

See also

createReverseIterator()method 
public static function createReverseIterator(cursor:YCursor):Iterator

Creates a last-to-first Iterator view of the given cursor.

Note that the returned iterator does not support the remove (com.yworks.bridge.util.Iterator.removeItem()) operation.

Parameters

cursor:YCursor — The cursor.

Returns
Iterator — The iterator view of the given cursor.

See also

getClass()method 
override public function getClass():Class

Returns
Class
toArray()method 
public static function toArray(cursor:YCursor, dest:Vector.<Object>):Vector.<Object>

Creates or fills an array with the values provided by the cursor

Parameters

cursor:YCursor — the cursor
 
dest:Vector.<Object> — the array to fill with the values or null if the method should create the array itself

Returns
Vector.<Object> — dest or a newly created array filled with the values from cursor