Type class
A version of a List where the elements are disposed automatically when removed from the list, unless autoDispose is set to false.
Sources
This information about ListAutoDispose is provided for reference only and is not available through exported packages and thus should not be imported or used on its own.
Inheritance
ListAutoDispose extends List.
ListAutoDispose is extended by ListTemplate.
Settings
ListAutoDispose does not have any settings.
Private settings
ListAutoDispose does not have any private settings.
Properties
|
autoDispose # |
Type Default Automatically disposes elements that are removed from the list. |
|---|---|
|
events # |
Type Default Inherited from |
|
length # |
Type Inherited from Number of items in list. @readonly |
|
values # |
Type Inherited from An array of values in the list. Don't change this array directly: use methods like @readonly |
| There are 3 inherited items currently hidden from this list. | |
Methods
|
[Symbol.iterator]() |
Returns Inherited from Returns an ES6 iterator for the list. |
|---|---|
|
clear() |
Returns Inherited from Removes all items from the list. |
|
constructor( initial: ) |
Returns Inherited from Constructor |
|
contains( value: ) |
Returns Inherited from Checks if list contains specific item reference. |
|
copyFrom( source: ) |
Returns Inherited from Adds all items of another list to the end of this one. |
|
dispose() |
Returns |
|
each( f: ( value: ) |
Returns Inherited from Calls |
|
eachReverse( f: ( value: ) |
Returns Inherited from Calls |
|
getIndex( index: ) |
Returns Inherited from Returns an item at specified index. |
|
hasIndex( index: ) |
Returns Inherited from Checks if there's a value at specific index. |
|
indexOf( value: ) |
Returns Inherited from Searches the list for specific item and returns its index. |
|
insertIndex( index: ) |
Returns Inherited from Inserts an item at |
|
isDisposed() |
Returns |
|
moveValue( value: ) |
Returns Inherited from Moves an item to |
|
pop() |
Returns Inherited from Returns the last item from the list, and removes it. |
|
push( value: ) |
Returns Inherited from Adds an item to the end of the list. |
|
pushAll( values: ) |
Returns Inherited from Adds multiple items to the end of the list. |
|
removeIndex( index: ) |
Returns Inherited from Removes a value at specific index. |
|
removeValue( value: ) |
Returns Inherited from Removes all copies of an item from the list. |
|
setAll( newArray: ) |
Returns Inherited from Replaces all items in the list with |
|
setIndex( index: ) |
Returns Inherited from Replaces the value at |
|
shift() |
Returns Inherited from Returns the first item from the list, and removes it. |
|
swap( a: ) |
Returns Swaps two items in the list, without disposing them. |
|
unshift( value: ) |
Returns Inherited from Adds an item as a first item in the list. |
| There are 21 inherited items currently hidden from this list. | |
Events
Add event handlers to ListAutoDispose object using its events.on() method.
Read about adding event handlers.
| #clear |
Param { oldValues: Inherited from All items were removed, by |
|---|---|
| #insertIndex |
Param { index: Inherited from An item was inserted at |
| #moveIndex |
Param { newIndex: Inherited from An item was moved from |
| #push |
Param { newValue: Inherited from An item was added to the end of the list. |
| #removeIndex |
Param { index: Inherited from The item at |
| #setIndex |
Param { index: Inherited from The item at |
| #swap |
Param { a: Inherited from Two items swapped places. |
| There are 7 inherited items currently hidden from this list. | |