Packagecom.yworks.bridge.util
Classpublic class AbstractSequentialList
InheritanceAbstractSequentialList Inheritance AbstractList Inheritance AbstractCollection Inheritance YObject Inheritance Object
Subclasses LinkedList

AbstractSequentialList is an abstract implementation of the List interface. This implementation does not support adding. A subclass must implement the abstract method listIterator().



Public Properties
 PropertyDefined By
 Inheritedempty : Boolean
[read-only] Returns true if the collection has no element, otherwise false.
AbstractCollection
 Inheritedlength : int
[read-only] Answers the number of elements in this Collection.
AbstractCollection
 InheritedmodCountInternal : int
AbstractList
Protected Properties
 PropertyDefined By
 InheritedmodCount : int
AbstractList
Public Methods
 MethodDefined By
  
AbstractSequentialList(init:Boolean = true)
Constructs a new instance of this AbstractSequentialList.
AbstractSequentialList
 Inherited
addAll(collection:Collection):Boolean
Adds the objects in the specified Collection to this Collection.
AbstractCollection
  
addAllAt(location:int, collection:Collection):Boolean
[override] Inserts the objects in the specified Collection at the specified location in this List.
AbstractSequentialList
 Inherited
addItem(object:Object):Boolean
[override] Adds the specified object at the end of this List.
AbstractList
  
addItemAt(location:int, object:Object):void
[override] Inserts the specified object into this List at the specified location.
AbstractSequentialList
 Inherited
clear():void
[override] Removes all elements from this List, leaving it empty.
AbstractList
  
clone():Object
[override]
AbstractSequentialList
 Inherited
containsAll(collection:Collection):Boolean
Searches this Collection for all objects in the specified Collection.
AbstractCollection
 Inherited
containsItem(object:Object):Boolean
Searches this Collection for the specified object.
AbstractCollection
 Inherited
equals(object:Object):Boolean
[override] Compares the specified object to this List and answer if they are equal.
AbstractList
  
getClass():Class
[override]
AbstractSequentialList
  
getItemAt(location:int):Object
[override] Answers the element at the specified location in this List.
AbstractSequentialList
 Inherited
hashCode():int
[override] Answers an integer hash code for the receiver.
AbstractList
 Inherited
indexOf(object:Object):int
Searches this List for the specified object and returns the index of the first occurrence.
AbstractList
  
[override] Answers an Iterator on the elements of this List.
AbstractSequentialList
 Inherited
lastIndexOf(object:Object):int
Searches this List for the specified object and returns the index of the last occurrence.
AbstractList
 Inherited
Answers a ListIterator on the elements of this List.
AbstractList
  
[override] Answers a ListIterator on the elements of this List.
AbstractSequentialList
 Inherited
removeAll(collection:Collection):Boolean
Removes all occurrences in this Collection of each object in the specified Collection.
AbstractCollection
 Inherited
removeItem(object:Object):Boolean
Removes the first occurrence of the specified object from this Collection.
AbstractCollection
  
removeItemAt(location:int):Object
[override] Removes the object at the specified location from this List.
AbstractSequentialList
 Inherited
retainAll(collection:Collection):Boolean
Removes all objects from this Collection that are not contained in the specified Collection.
AbstractCollection
  
setItemAt(location:int, object:Object):Object
[override] Replaces the element at the specified location in this List with the specified object.
AbstractSequentialList
 Inherited
subList(start:int, end:int):List
Returns a part of consecutive elements of this list as a view.
AbstractList
 Inherited
toArray():Vector.<Object>
Answers a new array containing all elements contained in this Collection.
AbstractCollection
 Inherited
toArray2(contents:Vector.<Object>):Vector.<Object>
Answers an array containing all elements contained in this Collection.
AbstractCollection
 Inherited
toString():String
Answers the string representation of this Collection.
AbstractCollection
Protected Methods
 MethodDefined By
  
cloneImpl(o:Object):void
[override]
AbstractSequentialList
 Inherited
AbstractCollection
 Inherited
AbstractList
  
AbstractSequentialList
 Inherited
removeRange(start:int, end:int):void
Removes the objects in the specified range from the start to the, but not including, end index.
AbstractList
Constructor Detail
AbstractSequentialList()Constructor
public function AbstractSequentialList(init:Boolean = true)

Constructs a new instance of this AbstractSequentialList.

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
addAllAt()method
override public function addAllAt(location:int, collection:Collection):Boolean

Inserts the objects in the specified Collection at the specified location in this List. The objects are added in the order they are returned from the Collection iterator.

Parameters

location:int — the index at which to insert
 
collection:Collection — the Collection of objects

Returns
Boolean — true if this List is modified, false otherwise

Throws
flash.errors:IllegalOperationError — when adding to this List is not supported
 
TypeError — when the class of an object is inappropriate for this List
 
IllegalArgumentException — when an object cannot be added to this List
 
RangeError — when location < 0 || >= size()
addItemAt()method 
override public function addItemAt(location:int, object:Object):void

Inserts the specified object into this List at the specified location. The object is inserted before any previous element at the specified location. If the location is equal to the size of this List, the object is added at the end.

Parameters

location:int — the index at which to insert
 
object:Object — the object to add


Throws
flash.errors:IllegalOperationError — when adding to this List is not supported
 
TypeError — when the class of the object is inappropriate for this List
 
IllegalArgumentException — when the object cannot be added to this List
 
RangeError — when location < 0 || >= size()
 
ReferenceError — when the object is null and this List does not support null elements
clone()method 
override public function clone():Object

Returns
Object
cloneImpl()method 
override protected function cloneImpl(o:Object):void

Parameters

o:Object

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

Returns
Class
getItemAt()method 
override public function getItemAt(location:int):Object

Answers the element at the specified location in this List.

Parameters

location:int — the index of the element to return

Returns
Object — the element at the specified location

Throws
RangeError — when location < 0 || >= size()
initAbstractSequentialList()method 
protected final function initAbstractSequentialList():void

iterator()method 
override public function iterator():Iterator

Answers an Iterator on the elements of this List. The elements are iterated in the same order that they occur in the List.

Returns
Iterator — an Iterator on the elements of this List

See also

listIterator2()method 
override public function listIterator2(location:int):ListIterator

Answers a ListIterator on the elements of this List. The elements are iterated in the same order that they occur in the List. The iteration starts at the specified location.

Parameters

location:int — the index at which to start the iteration

Returns
ListIterator — a ListIterator on the elements of this List

Throws
RangeError — when location < 0 || >= size()

See also

removeItemAt()method 
override public function removeItemAt(location:int):Object

Removes the object at the specified location from this List.

Parameters

location:int — the index of the object to remove

Returns
Object — the removed object

Throws
flash.errors:IllegalOperationError — when removing from this List is not supported
 
RangeError — when location < 0 || >= size()
setItemAt()method 
override public function setItemAt(location:int, object:Object):Object

Replaces the element at the specified location in this List with the specified object.

Parameters

location:int — the index at which to put the specified object
 
object:Object — the object to add

Returns
Object — the previous element at the index

Throws
flash.errors:IllegalOperationError — when replacing elements in this List is not supported
 
TypeError — when the class of an object is inappropriate for this List
 
IllegalArgumentException — when an object cannot be added to this List
 
RangeError — when location < 0 || >= size()