| Package | com.yworks.util |
| Class | public class CompositeCollectionModel |
| Inheritance | CompositeCollectionModel com.yworks.support.EventDispatchingProxy |
| Implements | ICollectionModel |
| Subclasses | WrappingCollectionModel |
ICollectionModel implementation that is the composite of two models.
This class also lets you use [ ] array notation to access the getItemAt()
method. Writing is not supported.
The for each..in loop is also supported. Please note that depending
on the collections this model is composed of, iterating with for each..in
may be considerably slower than iterating using the Iterator returned by
the iterator() method.
See also
| Method | Defined By | ||
|---|---|---|---|
Constructor takes the two models. | CompositeCollectionModel | ||
This implementation does not allow to add or remove items. | CompositeCollectionModel | ||
addItem(item:Object):Boolean
This implementation does not allow to add or remove items. | CompositeCollectionModel | ||
clear():void
Removes all of the elements from this collection. | CompositeCollectionModel | ||
contains(item:Object):Boolean
Returns true if this collection contains the specified element. | CompositeCollectionModel | ||
dispose():void | CompositeCollectionModel | ||
getItemAt(index:int):Object
Returns the element at the specified position in this collection. | CompositeCollectionModel | ||
isEmpty():Boolean | CompositeCollectionModel | ||
Returns an iterator over a set of elements. | CompositeCollectionModel | ||
length():uint
Returns the number of elements in this collection. | CompositeCollectionModel | ||
removeItem(item:Object):Boolean
This implementation does not allow to add or remove items. | CompositeCollectionModel | ||
toArray():Array
Returns an array containing all of the elements in this collection. | CompositeCollectionModel | ||
| CompositeCollectionModel | () | Constructor |
public function CompositeCollectionModel(collection1:ICollectionModel, collection2:ICollectionModel)Constructor takes the two models.
Parameterscollection1:ICollectionModel — A model.
| |
collection2:ICollectionModel — Another model.
|
| addAll | () | method |
public function addAll(iter:Iterable):voidThis implementation does not allow to add or remove items.
Parameters
iter:Iterable |
| addItem | () | method |
public function addItem(item:Object):BooleanThis implementation does not allow to add or remove items.
Parameters
item:Object |
Boolean |
| clear | () | method |
public function clear():voidRemoves all of the elements from this collection. The collection will be empty after this method returns.
| contains | () | method |
public function contains(item:Object):BooleanReturns 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
|
| dispose | () | method |
public function dispose():void
| getItemAt | () | method |
public function getItemAt(index:int):ObjectReturns 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():BooleanReturnsBoolean |
| iterator | () | method |
public function iterator():IteratorReturns an iterator over a set of elements.
ReturnsIterator — an Iterator.
|
| length | () | method |
public function length():uintReturns the number of elements in this collection.
Returnsuint — the number of elements in this collection
|
| removeItem | () | method |
public function removeItem(item:Object):BooleanThis implementation does not allow to add or remove items.
Parameters
item:Object |
Boolean |
| toArray | () | method |
public function toArray():ArrayReturns an array containing all of the elements in this collection.
ReturnsArray — an array containing all of the elements in this collection
|