| Package | com.yworks.bridge.util |
| Class | public class ArrayList |
| Inheritance | ArrayList AbstractList AbstractCollection YObject Object |
| Implements | List, Clonable, RandomAccess |
| Property | Defined By | ||
|---|---|---|---|
| empty : Boolean [override] [read-only]
Answers if this ArrayList has no elements, a size of zero. | ArrayList | ||
| length : int [override] [read-only]
Answers the number of elements in this ArrayList. | ArrayList | ||
![]() | modCountInternal : int | AbstractList | |
| Method | Defined By | ||
|---|---|---|---|
ArrayList(init:Boolean = true)
Constructs a new instance of ArrayList with capacity for ten elements. | ArrayList | ||
addAll(collection:Collection):Boolean [override]
Adds the objects in the specified Collection to this ArrayList. | ArrayList | ||
addAllAt(location:int, collection:Collection):Boolean [override]
Inserts the objects in the specified Collection at the specified location in this ArrayList. | ArrayList | ||
addItem(object:Object):Boolean [override]
Adds the specified object at the end of this ArrayList. | ArrayList | ||
addItemAt(location:int, object:Object):void [override]
Inserts the specified object into this ArrayList at the specified location. | ArrayList | ||
clear():void [override]
Removes all elements from this ArrayList, leaving it empty. | ArrayList | ||
clone():Object [override]
Answers a new ArrayList with the same elements, size and capacity as this ArrayList. | ArrayList | ||
![]() | containsAll(collection:Collection):Boolean
Searches this Collection for all objects in the specified Collection. | AbstractCollection | |
containsItem(object:Object):Boolean [override]
Searches this ArrayList for the specified object. | ArrayList | ||
ensureCapacity(minimumCapacity:int):void
Ensures that this ArrayList can hold the specified number of elements without growing. | ArrayList | ||
![]() | equals(object:Object):Boolean [override]
Compares the specified object to this List and answer if they are equal. | AbstractList | |
getClass():Class [override] | ArrayList | ||
getItemAt(location:int):Object [override]
Answers the element at the specified location in this ArrayList. | ArrayList | ||
![]() | hashCode():int [override]
Answers an integer hash code for the receiver. | AbstractList | |
indexOf(object:Object):int [override]
Searches this ArrayList for the specified object and returns the index of the first occurrence. | ArrayList | ||
![]() | [override]
Answers an Iterator on the elements of this List. | AbstractList | |
lastIndexOf(object:Object):int [override]
Searches this ArrayList for the specified object and returns the index of the last occurrence. | ArrayList | ||
![]() |
Answers a ListIterator on the elements of this List. | AbstractList | |
![]() | listIterator2(location:int):ListIterator
Answers a ListIterator on the elements of this List. | AbstractList | |
[static]
Constructs a new instance of ArrayList with capacity for ten elements. | ArrayList | ||
newArrayList2(capacity:int):ArrayList [static]
Constructs a new instance of ArrayList with the specified capacity. | ArrayList | ||
[static]
Constructs a new instance of ArrayList containing the elements in the specified collection. | ArrayList | ||
![]() | removeAll(collection:Collection):Boolean
Removes all occurrences in this Collection of each object in the specified Collection. | AbstractCollection | |
removeItem(object:Object):Boolean [override]
Removes the first one of the specified object in this list, if present. | ArrayList | ||
removeItemAt(location:int):Object [override]
Removes the object at the specified location from this ArrayList. | ArrayList | ||
![]() | 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 ArrayList with the specified object. | ArrayList | ||
![]() |
Returns a part of consecutive elements of this list as a view. | AbstractList | |
toArray():Vector.<Object> [override]
Answers a new array containing all elements contained in this ArrayList. | ArrayList | ||
toArray2(contents:Vector.<Object>):Vector.<Object> [override]
Answers an array containing all elements contained in this ArrayList. | ArrayList | ||
![]() | toString():String
Answers the string representation of this Collection. | AbstractCollection | |
trimToSize():void
Sets the capacity of this ArrayList to be the same as the size. | ArrayList | ||
| Method | Defined By | ||
|---|---|---|---|
cloneImpl(o:Object):void [override] | ArrayList | ||
![]() | initAbstractCollection():void | AbstractCollection | |
![]() | initAbstractList():void | AbstractList | |
initArrayList1():void
Initializes this object. | ArrayList | ||
initArrayList2(capacity:int):void
Initializes this object. | ArrayList | ||
initArrayList3(collection:Collection):void
Initializes this object. | ArrayList | ||
removeRange(start:int, end:int):void [override]
Removes the objects in the specified range from the start to the end, but not including the end index. | ArrayList | ||
| empty | property |
empty:Boolean [read-only] [override] Answers if this ArrayList has no elements, a size of zero.
public function get empty():BooleanSee also
| length | property |
length:int [read-only] [override] Answers the number of elements in this ArrayList.
public function get length():int| ArrayList | () | Constructor |
public function ArrayList(init:Boolean = true)Constructs a new instance of ArrayList with capacity for ten elements.
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.
|
| addAll | () | method |
override public function addAll(collection:Collection):BooleanAdds the objects in the specified Collection to this ArrayList.
Parameters
collection:Collection — the Collection of objects
|
Boolean — true if this ArrayList is modified, false otherwise
|
| addAllAt | () | method |
override public function addAllAt(location:int, collection:Collection):BooleanInserts the objects in the specified Collection at the specified location in this ArrayList. 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 ArrayList is modified, false otherwise
|
RangeError — when location < 0 || > size()
|
| addItem | () | method |
override public function addItem(object:Object):BooleanAdds the specified object at the end of this ArrayList.
Parameters
object:Object — the object to add
|
Boolean — true
|
| addItemAt | () | method |
override public function addItemAt(location:int, object:Object):voidInserts the specified object into this ArrayList 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 ArrayList, the object is added at the end.
Parameters
location:int — the index at which to insert
| |
object:Object — the object to add
|
RangeError — when location < 0 || >= size()
|
| clear | () | method |
override public function clear():voidRemoves all elements from this ArrayList, leaving it empty.
See also
| clone | () | method |
override public function clone():ObjectAnswers a new ArrayList with the same elements, size and capacity as this ArrayList.
ReturnsObject — a shallow copy of this ArrayList
|
See also
| cloneImpl | () | method |
override protected function cloneImpl(o:Object):voidParameters
o:Object |
| containsItem | () | method |
override public function containsItem(object:Object):BooleanSearches this ArrayList for the specified object.
Parameters
object:Object — the object to search for
|
Boolean — true if object is an element of this ArrayList, false otherwise
|
| ensureCapacity | () | method |
public function ensureCapacity(minimumCapacity:int):voidEnsures that this ArrayList can hold the specified number of elements without growing.
Parameters
minimumCapacity:int — the minimum number of elements that this ArrayList will hold before growing
|
| getClass | () | method |
override public function getClass():ClassReturnsClass |
| getItemAt | () | method |
override public function getItemAt(location:int):ObjectAnswers the element at the specified location in this ArrayList.
Parameters
location:int — the index of the element to return
|
Object — the element at the specified index
|
RangeError — when location < 0 || >= size()
|
| indexOf | () | method |
override public function indexOf(object:Object):intSearches this ArrayList 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
|
| initArrayList1 | () | method |
protected final function initArrayList1():void
Initializes this object. See the documentation of the corresponding factory method newArrayList1() for details.
See also
| initArrayList2 | () | method |
protected final function initArrayList2(capacity:int):void
Initializes this object. See the documentation of the corresponding factory method newArrayList2() for details.
Parameters
capacity:int |
See also
| initArrayList3 | () | method |
protected final function initArrayList3(collection:Collection):void
Initializes this object. See the documentation of the corresponding factory method newArrayList3() for details.
Parameters
collection:Collection |
See also
| lastIndexOf | () | method |
override public function lastIndexOf(object:Object):intSearches this ArrayList 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
|
| newArrayList1 | () | method |
public static function newArrayList1():ArrayListConstructs a new instance of ArrayList with capacity for ten elements.
ReturnsArrayList |
| newArrayList2 | () | method |
public static function newArrayList2(capacity:int):ArrayListConstructs a new instance of ArrayList with the specified capacity.
Parameters
capacity:int — the initial capacity of this ArrayList
|
ArrayList |
| newArrayList3 | () | method |
public static function newArrayList3(collection:Collection):ArrayListConstructs a new instance of ArrayList containing the elements in the specified collection. The ArrayList will have an initial capacity which is 110% of the size of the collection. The order of the elements in this ArrayList is the order they are returned by the collection iterator.
Parameters
collection:Collection — the collection of elements to add
|
ArrayList |
| removeItem | () | method |
override public function removeItem(object:Object):BooleanRemoves the first one of the specified object in this list, if present.
Parameters
object:Object — the object to removes
|
Boolean — true if the list contains the object
|
See also
| removeItemAt | () | method |
override public function removeItemAt(location:int):ObjectRemoves the object at the specified location from this ArrayList.
Parameters
location:int — the index of the object to remove
|
Object — the removed object
|
RangeError — when location < 0 || >= size()
|
| removeRange | () | method |
override protected function removeRange(start:int, end:int):voidRemoves the objects in the specified range from the start to the end, but not including the 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
|
RangeError — when start < 0, start > end or end > size()
|
| setItemAt | () | method |
override public function setItemAt(location:int, object:Object):ObjectReplaces the element at the specified location in this ArrayList 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
|
RangeError — when location < 0 || >= size()
|
| toArray | () | method |
override public function toArray():Vector.<Object>Answers a new array containing all elements contained in this ArrayList.
ReturnsVector.<Object> — an array of the elements from this ArrayList
|
| toArray2 | () | method |
override public function toArray2(contents:Vector.<Object>):Vector.<Object>Answers an array containing all elements contained in this ArrayList. If the specified array is large enough to hold the elements, the specified array is used, otherwise an array of the same type is created. If the specified array is used and is larger than this ArrayList, the array element following the collection elements is set to null.
Parameters
contents:Vector.<Object> — the array
|
Vector.<Object> — an array of the elements from this ArrayList
|
Error — when the type of an element in this ArrayList cannot be stored in the type of the specified array
|
| trimToSize | () | method |
public function trimToSize():voidSets the capacity of this ArrayList to be the same as the size.
See also