Class: KeySet

Oracle® JavaScript Extension Toolkit (JET)
17.0.0

F92240-01

Since:
  • 4.1.0
Module:
  • ojkeyset

QuickNav

Description

The base class for KeySetImpl and AllKeySetImpl. Represents an immutable set of keys.


Usage

Signature:

abstract class KeySet<K>

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

For additional information visit:


The base class for KeySetImpl and AllKeySetImpl. Represents an immutable set of keys.

Methods

(abstract) add(keys: Set<K>|Array<K>): KeySet<K>

Returns a new KeySet based on this set with the specified keys included.
Parameters:
Name Type Description
keys Set | Array a set of keys to add to this KeySet.
Returns:

a new KeySet with the specified keys included.

Type
KeySet

(abstract) addAll(): KeySet<K>

Returns a new KeySet that signals all keys are added to this set.
Returns:

a new KeySet that signals all keys are added to this set.

Type
KeySet

(abstract) clear(): KeySet<K>

Returns a new KeySet containing no keys.
Returns:

a new KeySet with no keys.

Type
KeySet

(abstract) delete(keys: Set<K>|Array<K>): KeySet<K>

Returns a new KeySet based on this set with the specified keys excluded.
Parameters:
Name Type Description
keys Set | Array a set of keys to remove from this KeySet.
Returns:

a new KeySet with the specified keys excluded.

Type
KeySet

(abstract) has(key) : {boolean}

Returns whether the specified key is contained in this set.
Parameters:
Name Type Description
key K the key to check whether it is contained in this set.
Returns:

true if the specified key is contained in this set, false otherwise.

Type
boolean

(abstract) isAddAll : {boolean}

Returns whether this set should include all keys.
Returns:

true if this set should include all keys, false otherwise.

Type
boolean