Package | com.yworks.support |
Interface | public interface Collection extends Iterable |
Implementors | BendList, HashSet |
Method | Defined By | ||
---|---|---|---|
Adds all of the elements in the specified collection to this collection (optional operation). | Collection | ||
addItem(item:Object):Boolean
Adds the specified item to this collection. | Collection | ||
clear():void
Removes all of the elements from this collection. | Collection | ||
contains(item:Object):Boolean
Returns true if this collection contains the specified element. | Collection | ||
getItemAt(index:int):Object
Returns the element at the specified position in this collection. | Collection | ||
isEmpty():Boolean
Returns true if this collection contains no elements. | Collection | ||
Returns an iterator over a set of elements. | Iterable | ||
length():uint
Returns the number of elements in this collection. | Collection | ||
removeItem(item:Object):Boolean
Removes a single instance of the specified element from this collection, if it is present (optional operation). | Collection | ||
toArray():Array
Returns an array containing all of the elements in this collection. | Collection |
addAll | () | method |
public function addAll(iterable:Iterable):void
Adds all of the elements in the specified collection to this collection (optional operation).
Parameters
iterable:Iterable — the collection containing elements to be added to this collection
|
addItem | () | method |
public function addItem(item:Object):Boolean
Adds the specified item to this collection. Returns true if this collection changed as a result of the call. (Returns false if this collection does not permit duplicates and already contains the specified element.)
Parameters
item:Object — element whose presence in this collection is to be ensured
|
Boolean — true if this collection changed as a result of the call
|
clear | () | method |
public function clear():void
Removes all of the elements from this collection. The collection will be empty after this method returns.
contains | () | method |
public function contains(item:Object):Boolean
Returns true if this collection contains the specified element.
Parameters
item:Object — element whose presence in this collection is to be tested
|
Boolean — true if this collection contains the specified element
|
getItemAt | () | method |
public function getItemAt(index:int):Object
Returns the element at the specified position in this collection.
Parameters
index:int — the index of the element to return
|
Object — the element at the specified position in this list
|
isEmpty | () | method |
public function isEmpty():Boolean
Returns true if this collection contains no elements.
ReturnsBoolean — true if this collection contains no elements
|
length | () | method |
public function length():uint
Returns the number of elements in this collection.
Returnsuint — the number of elements in this collection
|
removeItem | () | method |
public function removeItem(item:Object):Boolean
Removes a single instance of the specified element from this collection, if it is present (optional operation).
Parameters
item:Object — element to be removed from this collection, if present
|
Boolean — true if an element was removed as a result of this call
|
toArray | () | method |
public function toArray():Array
Returns an array containing all of the elements in this collection.
ReturnsArray — an array containing all of the elements in this collection
|