ObserverList
this class was deprecated. Use Model.js instead as it uses RxJs now.
Class for observer list to facilitate observing
Constructor Summary
Public Constructor | ||
public |
this constructor was deprecated. Creates an instance of an ObserverList, initializing the observers as empty.
|
Member Summary
Public Members | ||
public |
this member was deprecated. Adds an observer to the observers list.
|
|
public |
this member was deprecated. Returns the number of observers in the list.
|
|
public |
this member was deprecated. Checks if a class is an observer.
|
|
public |
this member was deprecated. Get an observer at a certain index.
|
|
public |
observers: *[] |
|
public |
this member was deprecated. Removes an object at a certain index or an observer
|
|
public |
removeIndex(index: Number): Boolean: * this member was deprecated. Removes an observer at the specified index. Returns if the index is greater than the length
of the array.
|
Private Members | ||
private |
_deepCopy: List: * this member was deprecated. Returns a deep copy of the array by reassigning the values. This is to make sure we can clear the data.
|
Public Constructors
public constructor() source
this constructor was deprecated. Creates an instance of an ObserverList, initializing the observers as empty.
Public Members
public add(observer: Object): Number: * source
this member was deprecated. Adds an observer to the observers list.
public count: Number: * source
this member was deprecated. Returns the number of observers in the list.
public exists(A: Object): Boolean: * source
this member was deprecated. Checks if a class is an observer.
public get(index: Number): Object: * source
this member was deprecated. Get an observer at a certain index.
public observers: *[] source
public remove(observer: Object): * source
this member was deprecated. Removes an object at a certain index or an observer
public removeIndex(index: Number): Boolean: * source
this member was deprecated. Removes an observer at the specified index. Returns if the index is greater than the length
of the array.
Return:
Boolean | true: if the observer was removed (index is less than the number of observers); false: otherwise |
Private Members
private _deepCopy: List: * source
this member was deprecated. Returns a deep copy of the array by reassigning the values. This is to make sure we can clear the data.
Return:
List | A list to copy |