ReadOnlyObservableSet - Andrei15193/react-model-view-viewmodel GitHub Wiki
API / ReadOnlyObservableSet<TItem> class
Represents a read-only observable set based on the Set interface.
Extends ViewModel.
Implements IReadOnlyObservableSet<TItem>.
class ReadOnlyObservableSet<TItem>
extends ViewModel
implements IReadOnlyObservableSet<TItem>
Source reference: src/collections/observableSet/ReadOnlyObservableSet.ts:13
.
- TItem - The type of items the set contains.
-
constructor - Initializes a new instance of the
ReadOnlyObservableSet<TItem>
class.
-
readonly
setChanged - An event that is raised when the set changed by adding or removing items. - size - Gets the number of items in the set.
-
inherited
propertiesChanged - An event that is raised when one or more properties may have changed.
- [iterator] - Gets an iterator that provides each element in the collection.
- difference - Generates a set that contains all items in the current one, but not in the provided collection.
- entries - Gets an iterator that provides each element in the collection in an item-item tupple. Items in a set are their own key.
-
forEach - Iterates over the entire collections executing the
callback
for each. - has - Checks whether the provided item is in the collection.
- intersection - Generates a set that contains the items contained by both the current and provided collection.
- isDisjointFrom - Checks whether there are no items common in both the current set and the provided collection.
- isSubsetOf - Checks whether all items from the current set are contained by the provided collection.
- isSupersetOf - Checks whether all items from the provided collection are contained by the current set.
-
keys - Gets an iterator that provides each element in the collection, this is an alias for
ReadOnlyObservableSet.values
- symmetricDifference - Generates a set that contains all items from both the current and provided collection, but are not contained by both.
- toSet - Converts the observable set to a native JavaScript Set.
- union - Generates a set that contains all items from both the current and the provided collection.
- values - Gets an iterator that provides each item in the collection.
-
protected
add - Ensures the provideditem
is in the set. There can be at most only one instance of an item in a set at any given time. -
protected
clear - Empties the set of all items. -
protected
delete - Ensures the provideditem
is not in the set.
-
ViewModel
- ReadOnlyObservableCollection<TItem>
- ReadOnlyObservableSet<TItem>
- ReadOnlyObservableMap<TKey, TItem>
- Validatable<TValidationError>