Packagecom.yworks.yfiles.base
Classpublic class NodeList
InheritanceNodeList Inheritance YList Inheritance YObject Inheritance Object

Specialized list implementation for instances of type com.yworks.yfiles.base.Node.

See also

com.yworks.yfiles.base.Node


Public Properties
 PropertyDefined By
 Inheritedempty : Boolean
[read-only] Checks whether this list contains elements.
YList
 Inheritedlength : int
[read-only] Returns the number of elements in this list.
YList
Public Methods
 MethodDefined By
  
NodeList(init:Boolean = true)
Creates an empty node list.
NodeList
 Inherited
addAll(collection:Collection):Boolean
Appends all elements provided by the given collection to this list.
YList
 Inherited
addAllAt(index:int, c:Collection):Boolean
YList
 Inherited
Appends all elements provided by the given cursor to this list.
YList
 Inherited
addFirst(o:Object):ListCell
Inserts the given object at the head of this list.
YList
 Inherited
Adds a formerly removed ListCell object at the head of this list.
YList
 Inherited
addItem(o:Object):Boolean
Same as addLast().
YList
 Inherited
addItemAt(index:int, element:Object):void
YList
 Inherited
addLast(o:Object):ListCell
Inserts the given object at the tail of this list.
YList
 Inherited
Adds a formerly removed ListCell object at the tail of this list.
YList
 Inherited
clear():void
Removes all elements from this list.
YList
 Inherited
containsAll(collection:Collection):Boolean
Whether or not this list contains all the elements in the given collection.
YList
 Inherited
containsItem(o:Object):Boolean
Whether or not this list contains the given element.
YList
 Inherited
Returns a cursor for this list.
YList
 Inherited
Returns the cyclic predecessor cell of the given list cell.
YList
 Inherited
Returns the cyclic successor cell of the given list cell.
YList
 Inherited
elementAt(i:int):Object
Returns the i-th element of this list.
YList
 Inherited
equals(other:Object):Boolean
[override]
YList
 Inherited
findCell(o:Object):ListCell
Returns the com.yworks.yfiles.base.ListCell where object o is stored.
YList
 Inherited
first():Object
Returns the first element of this list.
YList
 Inherited
Returns the first cell of this list.
YList
  
Returns the first node in this list, or null when the list is empty.
NodeList
 Inherited
getCell(index:int):ListCell
Gets the cell at the given index.
YList
  
getClass():Class
[override]
NodeList
 Inherited
getInfo(c:ListCell):Object
Returns the element stored in the given list cell.
YList
 Inherited
getItemAt(index:int):Object
YList
 Inherited
hashCode():int
[override]
YList
 Inherited
indexOf(obj:Object):int
Returns the zero-based index of the given element in this list.
YList
 Inherited
insertAfter(o:Object, refCell:ListCell):ListCell
Inserts the given object into this list with respect to a given reference list cell.
YList
 Inherited
insertBefore(o:Object, refCell:ListCell):ListCell
Inserts the given object into this list with respect to a given reference list cell.
YList
 Inherited
insertCellAfter(cellToInsert:ListCell, refCell:ListCell):void
Inserts a formerly removed ListCell object into this list with respect to a given reference list cell.
YList
 Inherited
insertCellBefore(cellToInsert:ListCell, refCell:ListCell):void
Inserts a formerly removed ListCell object into this list with respect to a given reference list cell.
YList
 Inherited
Returns an iterator for that list.
YList
 Inherited
last():Object
Returns the last element of this list.
YList
 Inherited
Returns the last cell of this list.
YList
 Inherited
lastIndexOf(o:Object):int
YList
  
Returns the last node in this list, or null when the list is empty.
NodeList
 Inherited
YList
 Inherited
YList
  
[static] Creates an empty node list.
NodeList
  
[static] Creates a list that is initialized with the elements provided by the given Iterator object.
NodeList
  
[static] Creates a list that is initialized with a single node provided.
NodeList
  
[static] Creates a list that is initialized with the nodes provided by the given NodeCursor object.
NodeList
  
[static] Creates a list that is initialized with the entries of the given list.
NodeList
  
newNodeList6(a:Vector.<Object>):NodeList
[static] Creates a list that is initialized with the nodes provided by the given array of nodes.
NodeList
  
[static] Creates a list that is initialized with those nodes from the given NodeCursor object for which the given data provider returns true upon calling its getBool (com.yworks.yfiles.base.DataProvider.getBool()) method.
NodeList
 Inherited
[static] Creates an empty doubly linked list.
YList
 Inherited
newYList2(a:Vector.<Object>):YList
[static] Creates a list that is initialized with the elements provided by the given array of objects.
YList
 Inherited
[static] Creates a list that is initialized with the elements provided by the given Collection object.
YList
 Inherited
[static] Creates a list that is initialized with the elements provided by the given Iterator object.
YList
 Inherited
[static] Creates a list that is initialized with the elements provided by the given YCursor object.
YList
 Inherited
[static] Creates a list that is initialized with those elements from the given YCursor object for which the given data provider returns true upon calling its getBool (com.yworks.yfiles.base.DataProvider.getBool()) method.
YList
  
Returns a node cursor for this node list.
NodeList
 Inherited
peek():Object
Equivalent to first().
YList
 Inherited
pop():Object
Removes the first element from this list and returns it.
YList
 Inherited
popLast():Object
Removes the last element from this list and returns it.
YList
  
Removes the first node from this list and returns it.
NodeList
 Inherited
Returns the predecessor cell of the given list cell.
YList
 Inherited
push(o:Object):ListCell
Equivalent to addFirst().
YList
 Inherited
removeAll(collection:Collection):Boolean
Removes the given collection of objects from this list.
YList
 Inherited
removeAt(c:YCursor):Object
Removes the element pointed to by the given YCursor object.
YList
 Inherited
Removes the given list cell, and hence the element stored in it, from this list.
YList
 Inherited
removeItem(o:Object):Boolean
Removes the given object from this list.
YList
 Inherited
removeItemAt(index:int):Object
YList
 Inherited
retainAll(collection:Collection):Boolean
Retains only those elements in this list which are contained in the given collection.
YList
 Inherited
reverse():void
Reverses the sequence of elements in this list.
YList
 Inherited
setInfo(c:ListCell, value:Object):void
Updates the element stored in the given list cell with the given object.
YList
 Inherited
setItemAt(index:int, element:Object):Object
YList
 Inherited
sort(comp:Comparator):void
Sorts the elements in this list according to the given comparator.
YList
 Inherited
sort2():void
Sorts the elements in this list into ascending order, according to their natural ordering.
YList
 Inherited
splice(list:YList):void
Transfers the contents of the given list to the end of this list.
YList
 Inherited
subList(fromIndex:int, toIndex:int):List
YList
 Inherited
Returns the successor cell of the given list cell.
YList
 Inherited
toArray():Vector.<Object>
Returns an array representation of this list.
YList
 Inherited
toArray2(a:Vector.<Object>):Vector.<Object>
Returns an array containing all list elements in the correct order.
YList
  
toNodeArray():Vector.<Object>
Returns a node array containing all elements of this list in the canonical order.
NodeList
 Inherited
toString():String
Returns a string representation of this List.
YList
Protected Methods
 MethodDefined By
  
Initializes this object.
NodeList
  
Initializes this object.
NodeList
  
Initializes this object.
NodeList
  
Initializes this object.
NodeList
  
Initializes this object.
NodeList
  
initNodeList6(a:Vector.<Object>):void
Initializes this object.
NodeList
  
Initializes this object.
NodeList
 Inherited
initYList1():void
Initializes this object.
YList
 Inherited
initYList2(a:Vector.<Object>):void
Initializes this object.
YList
 Inherited
Initializes this object.
YList
 Inherited
Initializes this object.
YList
 Inherited
Initializes this object.
YList
 Inherited
initYList6(c:YCursor, predicate:DataProvider):void
Initializes this object.
YList
Constructor Detail
NodeList()Constructor
public function NodeList(init:Boolean = true)

Creates an empty node list.

Parameters
init:Boolean (default = true) — An internally used switch to help handle proper instance initialization in inheritance chains where classes can have multiple constructor-like factory methods. This parameter can safely be ignored/omitted when calling the constructor.
Method Detail
firstNode()method
public function firstNode():Node

Returns the first node in this list, or null when the list is empty.

Returns
Node — The first node in the list.
getClass()method 
override public function getClass():Class

Returns
Class
initNodeList1()method 
protected final function initNodeList1():void

Initializes this object. See the documentation of the corresponding factory method newNodeList1() for details.

See also

initNodeList2()method 
protected final function initNodeList2(it:Iterator):void

Initializes this object. See the documentation of the corresponding factory method newNodeList2() for details.

Parameters

it:Iterator

See also

initNodeList3()method 
protected final function initNodeList3(v:Node):void

Initializes this object. See the documentation of the corresponding factory method newNodeList3() for details.

Parameters

v:Node

See also

initNodeList4()method 
protected final function initNodeList4(c:NodeCursor):void

Initializes this object. See the documentation of the corresponding factory method newNodeList4() for details.

Parameters

c:NodeCursor

See also

initNodeList5()method 
protected final function initNodeList5(list:NodeList):void

Initializes this object. See the documentation of the corresponding factory method newNodeList5() for details.

Parameters

list:NodeList

See also

initNodeList6()method 
protected final function initNodeList6(a:Vector.<Object>):void

Initializes this object. See the documentation of the corresponding factory method newNodeList6() for details.

Parameters

a:Vector.<Object>

See also

initNodeList7()method 
protected final function initNodeList7(nc:NodeCursor, predicate:DataProvider):void

Initializes this object. See the documentation of the corresponding factory method newNodeList7() for details.

Parameters

nc:NodeCursor
 
predicate:DataProvider

See also

lastNode()method 
public function lastNode():Node

Returns the last node in this list, or null when the list is empty.

Returns
Node — The last node in the list.
newNodeList1()method 
public static function newNodeList1():NodeList

Creates an empty node list.

Returns
NodeList
newNodeList2()method 
public static function newNodeList2(it:Iterator):NodeList

Creates a list that is initialized with the elements provided by the given Iterator object.

Parameters

it:Iterator

Returns
NodeList
newNodeList3()method 
public static function newNodeList3(v:Node):NodeList

Creates a list that is initialized with a single node provided.

Parameters

v:Node

Returns
NodeList
newNodeList4()method 
public static function newNodeList4(c:NodeCursor):NodeList

Creates a list that is initialized with the nodes provided by the given NodeCursor object.

Parameters

c:NodeCursor

Returns
NodeList
newNodeList5()method 
public static function newNodeList5(list:NodeList):NodeList

Creates a list that is initialized with the entries of the given list.

Parameters

list:NodeList — the values are added to the new list

Returns
NodeList
newNodeList6()method 
public static function newNodeList6(a:Vector.<Object>):NodeList

Creates a list that is initialized with the nodes provided by the given array of nodes.

Parameters

a:Vector.<Object>

Returns
NodeList
newNodeList7()method 
public static function newNodeList7(nc:NodeCursor, predicate:DataProvider):NodeList

Creates a list that is initialized with those nodes from the given NodeCursor object for which the given data provider returns true upon calling its getBool (com.yworks.yfiles.base.DataProvider.getBool()) method.

Parameters

nc:NodeCursor — A node cursor providing nodes that should be added to this list.
 
predicate:DataProvider — A data provider that acts as a inclusion predicate for each node accessible by the given node cursor.

Returns
NodeList

See also

nodes()method 
public function nodes():NodeCursor

Returns a node cursor for this node list.

Returns
NodeCursor — A node cursor granting access to the nodes within this list.
popNode()method 
public function popNode():Node

Removes the first node from this list and returns it.

Returns
Node — The first node from the list.
toNodeArray()method 
public function toNodeArray():Vector.<Object>

Returns a node array containing all elements of this list in the canonical order.

Returns
Vector.<Object>