Package | com.yworks.bridge.util |
Class | public class AbstractList |
Inheritance | AbstractList AbstractCollection YObject Object |
Implements | List |
Subclasses | AbstractSequentialList, ArrayList |
Property | Defined By | ||
---|---|---|---|
empty : Boolean [read-only]
Returns true if the collection has no element, otherwise false. | AbstractCollection | ||
length : int [read-only]
Answers the number of elements in this Collection. | AbstractCollection | ||
modCountInternal : int | AbstractList |
Property | Defined By | ||
---|---|---|---|
modCount : int | AbstractList |
Method | Defined By | ||
---|---|---|---|
AbstractList(init:Boolean = true)
Constructs a new instance of this AbstractList. | AbstractList | ||
addAll(collection:Collection):Boolean
Adds the objects in the specified Collection to this Collection. | AbstractCollection | ||
addAllAt(location:int, collection:Collection):Boolean
Inserts the objects in the specified Collection at the specified location in this List. | AbstractList | ||
addItem(object:Object):Boolean [override]
Adds the specified object at the end of this List. | AbstractList | ||
addItemAt(location:int, object:Object):void
Inserts the specified object into this List at the specified location. | AbstractList | ||
clear():void [override]
Removes all elements from this List, leaving it empty. | AbstractList | ||
clone():Object [override] | AbstractList | ||
containsAll(collection:Collection):Boolean
Searches this Collection for all objects in the specified Collection. | AbstractCollection | ||
containsItem(object:Object):Boolean
Searches this Collection for the specified object. | AbstractCollection | ||
equals(object:Object):Boolean [override]
Compares the specified object to this List and answer if they are equal. | AbstractList | ||
getClass():Class [override] | AbstractList | ||
getItemAt(location:int):Object
Answers the element at the specified location in this List. | AbstractList | ||
hashCode():int [override]
Answers an integer hash code for the receiver. | AbstractList | ||
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. | AbstractList | ||
lastIndexOf(object:Object):int
Searches this List for the specified object and returns the index of the last occurrence. | AbstractList | ||
Answers a ListIterator on the elements of this List. | AbstractList | ||
listIterator2(location:int):ListIterator
Answers a ListIterator on the elements of this List. | AbstractList | ||
removeAll(collection:Collection):Boolean
Removes all occurrences in this Collection of each object in the specified Collection. | AbstractCollection | ||
removeItem(object:Object):Boolean
Removes the first occurrence of the specified object from this Collection. | AbstractCollection | ||
removeItemAt(location:int):Object
Removes the object at the specified location from this List. | AbstractList | ||
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
Replaces the element at the specified location in this List with the specified object. | AbstractList | ||
Returns a part of consecutive elements of this list as a view. | AbstractList | ||
toArray():Vector.<Object>
Answers a new array containing all elements contained in this Collection. | AbstractCollection | ||
toArray2(contents:Vector.<Object>):Vector.<Object>
Answers an array containing all elements contained in this Collection. | AbstractCollection | ||
toString():String
Answers the string representation of this Collection. | AbstractCollection |
Method | Defined By | ||
---|---|---|---|
cloneImpl(o:Object):void [override] | AbstractList | ||
initAbstractCollection():void | AbstractCollection | ||
initAbstractList():void | AbstractList | ||
removeRange(start:int, end:int):void
Removes the objects in the specified range from the start to the, but not including, end index. | AbstractList |
modCount | property |
protected var modCount:int
modCountInternal | property |
modCountInternal:int
public function get modCountInternal():int
public function set modCountInternal(value:int):void
AbstractList | () | Constructor |
public function AbstractList(init:Boolean = true)
Constructs a new instance of this AbstractList.
Parametersinit: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.
|
addAllAt | () | method |
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
|
Boolean — true if this List is modified, false otherwise
|
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()
|
addItem | () | method |
override public function addItem(object:Object):Boolean
Adds the specified object at the end of this List.
Parameters
object:Object — the object to add
|
Boolean — true
|
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
|
addItemAt | () | method |
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
|
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()
|
clear | () | method |
override public function clear():void
Removes all elements from this List, leaving it empty.
flash.errors:IllegalOperationError — when removing from this List is not supported
|
See also
clone | () | method |
override public function clone():Object
ReturnsObject |
cloneImpl | () | method |
override protected function cloneImpl(o:Object):void
Parameters
o:Object |
equals | () | method |
override public function equals(object:Object):Boolean
Compares the specified object to this List and answer if they are equal. The object must be a List which contains the same objects in the same order.
Parameters
object:Object — the object to compare with this object
|
Boolean — true if the specified object is equal to this List, false otherwise
|
See also
getClass | () | method |
override public function getClass():Class
ReturnsClass |
getItemAt | () | method |
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
|
Object — the element at the specified index
|
RangeError — when location < 0 || >= size()
|
hashCode | () | method |
override public function hashCode():int
Answers an integer hash code for the receiver. Objects which are equal answer the same value for this method.
Returnsint — the receiver's hash
|
See also
indexOf | () | method |
public function indexOf(object:Object):int
Searches this List for the specified object and returns the index of the first occurrence.
Parameters
object:Object — the object to search for
|
int — the index of the first occurrence of the object
|
initAbstractList | () | method |
protected final function initAbstractList():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.
ReturnsIterator — an Iterator on the elements of this List
|
See also
lastIndexOf | () | method |
public function lastIndexOf(object:Object):int
Searches this List for the specified object and returns the index of the last occurrence.
Parameters
object:Object — the object to search for
|
int — the index of the last occurrence of the object
|
listIterator | () | method |
public function listIterator():ListIterator
Answers a ListIterator on the elements of this List. The elements are iterated in the same order that they occur in the List.
ReturnsListIterator — a ListIterator on the elements of this List
|
See also
listIterator2 | () | method |
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
|
ListIterator — a ListIterator on the elements of this List
|
RangeError — when location < 0 || >= size()
|
See also
removeItemAt | () | method |
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
|
Object — the removed object
|
flash.errors:IllegalOperationError — when removing from this List is not supported
| |
RangeError — when location < 0 || >= size()
|
removeRange | () | method |
protected function removeRange(start:int, end:int):void
Removes the objects in the specified range from the start to the, but not including, end index.
Parameters
start:int — the index at which to start removing
| |
end:int — the index one past the end of the range to remove
|
setItemAt | () | method |
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
|
Object — the previous element at the index
|
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()
|
subList | () | method |
public function subList(start:int, end:int):List
Returns a part of consecutive elements of this list as a view. From start (inclusive), to end(exclusive). The returned view will be of zero length if start equals end. Any change occurs in the returned subList will be reflected to the original list, and vice-versa. All the supported optional operations by the original list will also be supported by this subList. This method can be used as a handy method to do some operations on a sub range of the original list. For example: list.subList(from, to).clear(); If the original list is modified other than through the returned subList, the behavior of the returned subList becomes undefined. The returned subList is a subclass of AbstractList. The subclass stores offset, size of itself, and modCount of the original list. If the original list implements RandomAccess interface, the returned subList also implements RandomAccess interface. The subList's set(int, Object), get(int), add(int, Object), remove(int), addAll(int, Collection) and removeRange(int, int) methods first check the bounds, adjust offsets and then call the corresponding methods of the original AbstractList. addAll(Collection c) method of the returned subList calls the original addAll(offset + size, c). The listIterator(int) method of the subList wraps the original list iterator. The iterator() method of the subList invokes the original listIterator() method, and the size() method merely returns the size of the subList. All methods will throw a ConcurrentModificationException if the modCount of the original list is not equal to the expected value.
Parameters
start:int — start index of the subList, include start
| |
end:int — end index of the subList, exclude end
|
List — a subList view of this list start from start (inclusive), end with end (exclusive)
|
RangeError — when (start < 0 || end > size())
| |
IllegalArgumentException — when (start > end)
|