Package | com.yworks.bridge.util |
Interface | public interface List extends Collection |
Implementors | AbstractList, ArrayList, LinkedList, YList |
Method | Defined By | ||
---|---|---|---|
addAll(collection:Collection):Boolean
Attempts to add all of the objects contained in collection to the contents of this collection. | Collection | ||
addAllAt(location:int, collection:Collection):Boolean
Inserts the objects in the specified Collection at the specified location in this List. | List | ||
addItem(object:Object):Boolean
Attempts to add object to the contents of this Collection. | Collection | ||
addItemAt(location:int, object:Object):void
Inserts the specified object into this Vector at the specified location. | List | ||
clear():void
Removes all elements from this Collection, leaving it empty. | Collection | ||
containsAll(collection:Collection):Boolean
Searches this Collection for all objects in the specified Collection. | Collection | ||
containsItem(object:Object):Boolean
Searches this Collection for the specified object. | Collection | ||
getItemAt(location:int):Object
Answers the element at the specified location in this List. | List | ||
indexOf(object:Object):int
Searches this List for the specified object and returns the index of the first occurrence. | List | ||
Returns an instance of com.yworks.bridge.util.Iterator that may be used to access the objects contained by this collection. | Collection | ||
lastIndexOf(object:Object):int
Searches this List for the specified object and returns the index of the last occurrence. | List | ||
Answers a ListIterator on the elements of this List. | List | ||
listIterator2(location:int):ListIterator
Answers a ListIterator on the elements of this List. | List | ||
removeAll(collection:Collection):Boolean
Removes all occurrences in this Collection of each object in the specified Collection. | Collection | ||
removeItem(object:Object):Boolean
Removes the first occurrence of the specified object from this Collection. | Collection | ||
removeItemAt(location:int):Object
Removes the object at the specified location from this List. | List | ||
retainAll(collection:Collection):Boolean
Removes all objects from this Collection that are not also found in the contents of collection. | Collection | ||
setItemAt(location:int, object:Object):Object
Replaces the element at the specified location in this List with the specified object. | List | ||
Answers a List of the specified portion of this List from the start index to one less than the end index. | List | ||
toArray():Vector.<Object>
Answers a new array containing all elements contained in this Collection. | Collection | ||
toArray2(array:Vector.<Object>):Vector.<Object>
Answers an array containing all elements contained in this Collection. | Collection |
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()
|
addItemAt | () | method |
public function addItemAt(location:int, object:Object):void
Inserts the specified object into this Vector 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()
|
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 location
|
RangeError — when location < 0 || >= size()
|
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
|
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()
|
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
Answers a List of the specified portion of this List from the start index to one less than the end index. The returned List is backed by this list so changes to one are reflected by the other.
Parameters
start:int — the index at which to start the sublist
| |
end:int — the index one past the end of the sublist
|
List — a List of a portion of this List
|
RangeError — when start < 0, start > end or end > size()
|