Class: ObservableExpandedKeySet

Oracle® JavaScript Extension Toolkit (JET)
17.1.0

G12196-01

Module:
  • ojknockout-keyset

Note: This class is deprecated since 7.0.0. Use alternative: ObservableKeySet.

QuickNav

Description

Observable implementation of ExpandedKeySet that keeps track of mutation of KeySet. Since KeySet is immutable, all mutation methods return a new KeySet, and therefore applications must update the associated attribute with the new KeySet. The ObservableExpandedKeySet provides a convenient way for applications to mutate the KeySet directly without the need to update the associated attribute.


Usage

Signature:

class ObservableExpandedKeySet<K>

Generic Parameters
ParameterDescription
KType of Key
Typescript Import Format
//To import this class, use the format below.
import {ObservableExpandedKeySet} from "ojs/ojknockout-keyset";

For additional information visit:


Constructor

new ObservableExpandedKeySet(initialValue)

Create an observable version of a KeySet.
Parameters:
Name Type Argument Description
initialValue ExpandedKeySet.<K> | ExpandAllKeySet.<K> <optional>
The KeySet to observe.

Methods

add(keys) : {ObservableExpandedKeySet.<K>}

Updates the observable with a KeySet that includes the specified keys.
Parameters:
Name Type Description
keys Set<K> | Array<K> a set of keys to add to this KeySet.
Returns:

this observable KeySet.

Type
ObservableExpandedKeySet.<K>

addAll : {ObservableExpandedKeySet.<K>}

Updates the observable with a KeySet that has all keys.
Returns:

this observable KeySet.

Type
ObservableExpandedKeySet.<K>

clear : {ObservableExpandedKeySet.<K>}

Updates the observable with a KeySet that contains no keys.
Returns:

this observable KeySet.

Type
ObservableExpandedKeySet.<K>

delete(keys) : {ObservableExpandedKeySet.<K>}

Updates the observable with a KeySet that excludes the specified keys.
Parameters:
Name Type Description
keys Set<K> | Array<K> a set of keys to remove from this KeySet.
Returns:

this observable KeySet.

Type
ObservableExpandedKeySet.<K>