161847f8eSopenharmony_ci/*
261847f8eSopenharmony_ci * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
361847f8eSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
461847f8eSopenharmony_ci * you may not use this file except in compliance with the License.
561847f8eSopenharmony_ci * You may obtain a copy of the License at
661847f8eSopenharmony_ci *
761847f8eSopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
861847f8eSopenharmony_ci *
961847f8eSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
1061847f8eSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
1161847f8eSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1261847f8eSopenharmony_ci * See the License for the specific language governing permissions and
1361847f8eSopenharmony_ci * limitations under the License.
1461847f8eSopenharmony_ci */
1561847f8eSopenharmony_ci
1661847f8eSopenharmony_ci/**
1761847f8eSopenharmony_ci * @file
1861847f8eSopenharmony_ci * @kit ArkTS
1961847f8eSopenharmony_ci */
2061847f8eSopenharmony_ci
2161847f8eSopenharmony_ci/**
2261847f8eSopenharmony_ci * HashMap is a map implemented based on the array, linked list, and red-black tree. It provides efficient data query, insertion, 
2361847f8eSopenharmony_ci * and removal. The elements in a HashMap instance are mappings of key-value pairs. Each key must be unique and have only one value. 
2461847f8eSopenharmony_ci *
2561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang
2661847f8eSopenharmony_ci * @since 8
2761847f8eSopenharmony_ci */
2861847f8eSopenharmony_ci/**
2961847f8eSopenharmony_ci * HashMap is a map implemented based on the array, linked list, and red-black tree. It provides efficient data query, insertion, 
3061847f8eSopenharmony_ci * and removal. The elements in a HashMap instance are mappings of key-value pairs. Each key must be unique and have only one value. 
3161847f8eSopenharmony_ci *
3261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang
3361847f8eSopenharmony_ci * @crossplatform
3461847f8eSopenharmony_ci * @since 10
3561847f8eSopenharmony_ci */
3661847f8eSopenharmony_ci/**
3761847f8eSopenharmony_ci * HashMap is a map implemented based on the array, linked list, and red-black tree. It provides efficient data query, insertion,
3861847f8eSopenharmony_ci * and removal. The elements in a HashMap instance are mappings of key-value pairs. Each key must be unique and have only one value.
3961847f8eSopenharmony_ci *
4061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang
4161847f8eSopenharmony_ci * @crossplatform
4261847f8eSopenharmony_ci * @atomicservice
4361847f8eSopenharmony_ci * @since 12
4461847f8eSopenharmony_ci */
4561847f8eSopenharmony_cideclare class HashMap<K, V> {
4661847f8eSopenharmony_ci  /**
4761847f8eSopenharmony_ci   * A constructor used to create a HashMap object.
4861847f8eSopenharmony_ci   *
4961847f8eSopenharmony_ci   * @throws { BusinessError } 10200012 - The HashMap's constructor cannot be directly invoked.
5061847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
5161847f8eSopenharmony_ci   * @since 8
5261847f8eSopenharmony_ci   */
5361847f8eSopenharmony_ci  /**
5461847f8eSopenharmony_ci   * A constructor used to create a HashMap object.
5561847f8eSopenharmony_ci   *
5661847f8eSopenharmony_ci   * @throws { BusinessError } 10200012 - The HashMap's constructor cannot be directly invoked.
5761847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
5861847f8eSopenharmony_ci   * @crossplatform
5961847f8eSopenharmony_ci   * @since 10
6061847f8eSopenharmony_ci   */
6161847f8eSopenharmony_ci  /**
6261847f8eSopenharmony_ci   * A constructor used to create a HashMap object.
6361847f8eSopenharmony_ci   *
6461847f8eSopenharmony_ci   * @throws { BusinessError } 10200012 - The HashMap's constructor cannot be directly invoked.
6561847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
6661847f8eSopenharmony_ci   * @crossplatform
6761847f8eSopenharmony_ci   * @atomicservice
6861847f8eSopenharmony_ci   * @since 12
6961847f8eSopenharmony_ci   */
7061847f8eSopenharmony_ci  constructor();
7161847f8eSopenharmony_ci  /**
7261847f8eSopenharmony_ci   * Gets the element number of the hashmap.
7361847f8eSopenharmony_ci   *
7461847f8eSopenharmony_ci   * @type { number }
7561847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
7661847f8eSopenharmony_ci   * @since 8
7761847f8eSopenharmony_ci   */
7861847f8eSopenharmony_ci  /**
7961847f8eSopenharmony_ci   * Gets the element number of the hashmap.
8061847f8eSopenharmony_ci   *
8161847f8eSopenharmony_ci   * @type { number }
8261847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
8361847f8eSopenharmony_ci   * @crossplatform
8461847f8eSopenharmony_ci   * @since 10
8561847f8eSopenharmony_ci   */
8661847f8eSopenharmony_ci  /**
8761847f8eSopenharmony_ci   * Gets the element number of the hashmap.
8861847f8eSopenharmony_ci   *
8961847f8eSopenharmony_ci   * @type { number }
9061847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
9161847f8eSopenharmony_ci   * @crossplatform
9261847f8eSopenharmony_ci   * @atomicservice
9361847f8eSopenharmony_ci   * @since 12
9461847f8eSopenharmony_ci   */
9561847f8eSopenharmony_ci  length: number;
9661847f8eSopenharmony_ci  /**
9761847f8eSopenharmony_ci   * Returns whether the Map object contains elements
9861847f8eSopenharmony_ci   *
9961847f8eSopenharmony_ci   * @returns { boolean } the boolean type
10061847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The isEmpty method cannot be bound.
10161847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
10261847f8eSopenharmony_ci   * @since 8
10361847f8eSopenharmony_ci   */
10461847f8eSopenharmony_ci  /**
10561847f8eSopenharmony_ci   * Returns whether the Map object contains elements
10661847f8eSopenharmony_ci   *
10761847f8eSopenharmony_ci   * @returns { boolean } the boolean type
10861847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The isEmpty method cannot be bound.
10961847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
11061847f8eSopenharmony_ci   * @crossplatform
11161847f8eSopenharmony_ci   * @since 10
11261847f8eSopenharmony_ci   */
11361847f8eSopenharmony_ci  /**
11461847f8eSopenharmony_ci   * Returns whether the Map object contains elements
11561847f8eSopenharmony_ci   *
11661847f8eSopenharmony_ci   * @returns { boolean } the boolean type
11761847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The isEmpty method cannot be bound.
11861847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
11961847f8eSopenharmony_ci   * @crossplatform
12061847f8eSopenharmony_ci   * @atomicservice
12161847f8eSopenharmony_ci   * @since 12
12261847f8eSopenharmony_ci   */
12361847f8eSopenharmony_ci  isEmpty(): boolean;
12461847f8eSopenharmony_ci  /**
12561847f8eSopenharmony_ci   * Returns whether a key is contained in this map
12661847f8eSopenharmony_ci   *
12761847f8eSopenharmony_ci   * @param { K } key - key key need to determine whether to include the key
12861847f8eSopenharmony_ci   * @returns { boolean } the boolean type
12961847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The hasKey method cannot be bound.
13061847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
13161847f8eSopenharmony_ci   * @since 8
13261847f8eSopenharmony_ci   */
13361847f8eSopenharmony_ci  /**
13461847f8eSopenharmony_ci   * Returns whether a key is contained in this map
13561847f8eSopenharmony_ci   *
13661847f8eSopenharmony_ci   * @param { K } key - key key need to determine whether to include the key
13761847f8eSopenharmony_ci   * @returns { boolean } the boolean type
13861847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The hasKey method cannot be bound.
13961847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
14061847f8eSopenharmony_ci   * @crossplatform
14161847f8eSopenharmony_ci   * @since 10
14261847f8eSopenharmony_ci   */
14361847f8eSopenharmony_ci  /**
14461847f8eSopenharmony_ci   * Returns whether a key is contained in this map
14561847f8eSopenharmony_ci   *
14661847f8eSopenharmony_ci   * @param { K } key - key key need to determine whether to include the key
14761847f8eSopenharmony_ci   * @returns { boolean } the boolean type
14861847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The hasKey method cannot be bound.
14961847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
15061847f8eSopenharmony_ci   * @crossplatform
15161847f8eSopenharmony_ci   * @atomicservice
15261847f8eSopenharmony_ci   * @since 12
15361847f8eSopenharmony_ci   */
15461847f8eSopenharmony_ci  hasKey(key: K): boolean;
15561847f8eSopenharmony_ci  /**
15661847f8eSopenharmony_ci   * Returns whether a value is contained in this map
15761847f8eSopenharmony_ci   *
15861847f8eSopenharmony_ci   * @param { V } value - value value need to determine whether to include the value
15961847f8eSopenharmony_ci   * @returns { boolean } the boolean type
16061847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The hasValue method cannot be bound.
16161847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
16261847f8eSopenharmony_ci   * @since 8
16361847f8eSopenharmony_ci   */
16461847f8eSopenharmony_ci  /**
16561847f8eSopenharmony_ci   * Returns whether a value is contained in this map
16661847f8eSopenharmony_ci   *
16761847f8eSopenharmony_ci   * @param { V } value - value value need to determine whether to include the value
16861847f8eSopenharmony_ci   * @returns { boolean } the boolean type
16961847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The hasValue method cannot be bound.
17061847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
17161847f8eSopenharmony_ci   * @crossplatform
17261847f8eSopenharmony_ci   * @since 10
17361847f8eSopenharmony_ci   */
17461847f8eSopenharmony_ci  /**
17561847f8eSopenharmony_ci   * Returns whether a value is contained in this map
17661847f8eSopenharmony_ci   *
17761847f8eSopenharmony_ci   * @param { V } value - value value need to determine whether to include the value
17861847f8eSopenharmony_ci   * @returns { boolean } the boolean type
17961847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The hasValue method cannot be bound.
18061847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
18161847f8eSopenharmony_ci   * @crossplatform
18261847f8eSopenharmony_ci   * @atomicservice
18361847f8eSopenharmony_ci   * @since 12
18461847f8eSopenharmony_ci   */
18561847f8eSopenharmony_ci  hasValue(value: V): boolean;
18661847f8eSopenharmony_ci  /**
18761847f8eSopenharmony_ci   * Returns a specified element in a Map object, or undefined if there is no corresponding element
18861847f8eSopenharmony_ci   *
18961847f8eSopenharmony_ci   * @param { K } key - key key the index in HashMap
19061847f8eSopenharmony_ci   * @returns { V } value or undefined
19161847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The get method cannot be bound.
19261847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
19361847f8eSopenharmony_ci   * @since 8
19461847f8eSopenharmony_ci   */
19561847f8eSopenharmony_ci  /**
19661847f8eSopenharmony_ci   * Returns a specified element in a Map object, or undefined if there is no corresponding element
19761847f8eSopenharmony_ci   *
19861847f8eSopenharmony_ci   * @param { K } key - key key the index in HashMap
19961847f8eSopenharmony_ci   * @returns { V } value or undefined
20061847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The get method cannot be bound.
20161847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
20261847f8eSopenharmony_ci   * @crossplatform
20361847f8eSopenharmony_ci   * @since 10
20461847f8eSopenharmony_ci   */
20561847f8eSopenharmony_ci  /**
20661847f8eSopenharmony_ci   * Returns a specified element in a Map object, or undefined if there is no corresponding element
20761847f8eSopenharmony_ci   *
20861847f8eSopenharmony_ci   * @param { K } key - key key the index in HashMap
20961847f8eSopenharmony_ci   * @returns { V } value or undefined
21061847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The get method cannot be bound.
21161847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
21261847f8eSopenharmony_ci   * @crossplatform
21361847f8eSopenharmony_ci   * @atomicservice
21461847f8eSopenharmony_ci   * @since 12
21561847f8eSopenharmony_ci   */
21661847f8eSopenharmony_ci  get(key: K): V;
21761847f8eSopenharmony_ci  /**
21861847f8eSopenharmony_ci   * Adds all element groups in one map to another map
21961847f8eSopenharmony_ci   *
22061847f8eSopenharmony_ci   * @param { HashMap<K, V> } map - map map the Map object to add members
22161847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The setAll method cannot be bound.
22261847f8eSopenharmony_ci   * @throws { BusinessError } 401 -  Parameter error. Possible causes:
22361847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
22461847f8eSopenharmony_ci   * 2.Incorrect parameter types.
22561847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
22661847f8eSopenharmony_ci   * @since 8
22761847f8eSopenharmony_ci   */
22861847f8eSopenharmony_ci  /**
22961847f8eSopenharmony_ci   * Adds all element groups in one map to another map
23061847f8eSopenharmony_ci   *
23161847f8eSopenharmony_ci   * @param { HashMap<K, V> } map - map map the Map object to add members
23261847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The setAll method cannot be bound.
23361847f8eSopenharmony_ci   * @throws { BusinessError } 401 -  Parameter error. Possible causes:
23461847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
23561847f8eSopenharmony_ci   * 2.Incorrect parameter types.
23661847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
23761847f8eSopenharmony_ci   * @crossplatform
23861847f8eSopenharmony_ci   * @since 10
23961847f8eSopenharmony_ci   */
24061847f8eSopenharmony_ci  /**
24161847f8eSopenharmony_ci   * Adds all element groups in one map to another map
24261847f8eSopenharmony_ci   *
24361847f8eSopenharmony_ci   * @param { HashMap<K, V> } map - map map the Map object to add members
24461847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The setAll method cannot be bound.
24561847f8eSopenharmony_ci   * @throws { BusinessError } 401 -  Parameter error. Possible causes:
24661847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
24761847f8eSopenharmony_ci   * 2.Incorrect parameter types.
24861847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
24961847f8eSopenharmony_ci   * @crossplatform
25061847f8eSopenharmony_ci   * @atomicservice
25161847f8eSopenharmony_ci   * @since 12
25261847f8eSopenharmony_ci   */
25361847f8eSopenharmony_ci  setAll(map: HashMap<K, V>): void;
25461847f8eSopenharmony_ci  /**
25561847f8eSopenharmony_ci   * Adds or updates a(new) key-value pair with a key and value specified for the Map object
25661847f8eSopenharmony_ci   *
25761847f8eSopenharmony_ci   * @param { K } key - key key Added or updated targets
25861847f8eSopenharmony_ci   * @param { V } value - value value Added or updated value
25961847f8eSopenharmony_ci   * @returns { Object } the map object after set
26061847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The set method cannot be bound.
26161847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
26261847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified.
26361847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
26461847f8eSopenharmony_ci   * @since 8
26561847f8eSopenharmony_ci   */
26661847f8eSopenharmony_ci  /**
26761847f8eSopenharmony_ci   * Adds or updates a(new) key-value pair with a key and value specified for the Map object
26861847f8eSopenharmony_ci   *
26961847f8eSopenharmony_ci   * @param { K } key - key key Added or updated targets
27061847f8eSopenharmony_ci   * @param { V } value - value value Added or updated value
27161847f8eSopenharmony_ci   * @returns { Object } the map object after set
27261847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The set method cannot be bound.
27361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
27461847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified.
27561847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
27661847f8eSopenharmony_ci   * @crossplatform
27761847f8eSopenharmony_ci   * @since 10
27861847f8eSopenharmony_ci   */
27961847f8eSopenharmony_ci  /**
28061847f8eSopenharmony_ci   * Adds or updates a(new) key-value pair with a key and value specified for the Map object
28161847f8eSopenharmony_ci   *
28261847f8eSopenharmony_ci   * @param { K } key - key key Added or updated targets
28361847f8eSopenharmony_ci   * @param { V } value - value value Added or updated value
28461847f8eSopenharmony_ci   * @returns { Object } the map object after set
28561847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The set method cannot be bound.
28661847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
28761847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified.
28861847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
28961847f8eSopenharmony_ci   * @crossplatform
29061847f8eSopenharmony_ci   * @atomicservice
29161847f8eSopenharmony_ci   * @since 12
29261847f8eSopenharmony_ci   */
29361847f8eSopenharmony_ci  set(key: K, value: V): Object;
29461847f8eSopenharmony_ci  /**
29561847f8eSopenharmony_ci   * Remove a specified element from a Map object
29661847f8eSopenharmony_ci   *
29761847f8eSopenharmony_ci   * @param { K } key - key key Target to be deleted
29861847f8eSopenharmony_ci   * @returns { V } Target mapped value
29961847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The remove method cannot be bound.
30061847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
30161847f8eSopenharmony_ci   * @since 8
30261847f8eSopenharmony_ci   */
30361847f8eSopenharmony_ci  /**
30461847f8eSopenharmony_ci   * Remove a specified element from a Map object
30561847f8eSopenharmony_ci   *
30661847f8eSopenharmony_ci   * @param { K } key - key key Target to be deleted
30761847f8eSopenharmony_ci   * @returns { V } Target mapped value
30861847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The remove method cannot be bound.
30961847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
31061847f8eSopenharmony_ci   * @crossplatform
31161847f8eSopenharmony_ci   * @since 10
31261847f8eSopenharmony_ci   */
31361847f8eSopenharmony_ci  /**
31461847f8eSopenharmony_ci   * Remove a specified element from a Map object
31561847f8eSopenharmony_ci   *
31661847f8eSopenharmony_ci   * @param { K } key - key key Target to be deleted
31761847f8eSopenharmony_ci   * @returns { V } Target mapped value
31861847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The remove method cannot be bound.
31961847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
32061847f8eSopenharmony_ci   * @crossplatform
32161847f8eSopenharmony_ci   * @atomicservice
32261847f8eSopenharmony_ci   * @since 12
32361847f8eSopenharmony_ci   */
32461847f8eSopenharmony_ci  remove(key: K): V;
32561847f8eSopenharmony_ci  /**
32661847f8eSopenharmony_ci   * Clear all element groups in the map
32761847f8eSopenharmony_ci   *
32861847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The clear method cannot be bound.
32961847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
33061847f8eSopenharmony_ci   * @since 8
33161847f8eSopenharmony_ci   */
33261847f8eSopenharmony_ci  /**
33361847f8eSopenharmony_ci   * Clear all element groups in the map
33461847f8eSopenharmony_ci   *
33561847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The clear method cannot be bound.
33661847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
33761847f8eSopenharmony_ci   * @crossplatform
33861847f8eSopenharmony_ci   * @since 10
33961847f8eSopenharmony_ci   */
34061847f8eSopenharmony_ci  /**
34161847f8eSopenharmony_ci   * Clear all element groups in the map
34261847f8eSopenharmony_ci   *
34361847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The clear method cannot be bound.
34461847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
34561847f8eSopenharmony_ci   * @crossplatform
34661847f8eSopenharmony_ci   * @atomicservice
34761847f8eSopenharmony_ci   * @since 12
34861847f8eSopenharmony_ci   */
34961847f8eSopenharmony_ci  clear(): void;
35061847f8eSopenharmony_ci  /**
35161847f8eSopenharmony_ci   * Returns a new Iterator object that contains the keys contained in this map
35261847f8eSopenharmony_ci   *
35361847f8eSopenharmony_ci   * @returns { IterableIterator<K> }
35461847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The keys method cannot be bound.
35561847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
35661847f8eSopenharmony_ci   * @since 8
35761847f8eSopenharmony_ci   */
35861847f8eSopenharmony_ci  /**
35961847f8eSopenharmony_ci   * Returns a new Iterator object that contains the keys contained in this map
36061847f8eSopenharmony_ci   *
36161847f8eSopenharmony_ci   * @returns { IterableIterator<K> }
36261847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The keys method cannot be bound.
36361847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
36461847f8eSopenharmony_ci   * @crossplatform
36561847f8eSopenharmony_ci   * @since 10
36661847f8eSopenharmony_ci   */
36761847f8eSopenharmony_ci  /**
36861847f8eSopenharmony_ci   * Returns a new Iterator object that contains the keys contained in this map
36961847f8eSopenharmony_ci   *
37061847f8eSopenharmony_ci   * @returns { IterableIterator<K> }
37161847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The keys method cannot be bound.
37261847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
37361847f8eSopenharmony_ci   * @crossplatform
37461847f8eSopenharmony_ci   * @atomicservice
37561847f8eSopenharmony_ci   * @since 12
37661847f8eSopenharmony_ci   */
37761847f8eSopenharmony_ci  keys(): IterableIterator<K>;
37861847f8eSopenharmony_ci  /**
37961847f8eSopenharmony_ci   * Returns a new Iterator object that contains the values contained in this map
38061847f8eSopenharmony_ci   *
38161847f8eSopenharmony_ci   * @returns { IterableIterator<V> }
38261847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The values method cannot be bound.
38361847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
38461847f8eSopenharmony_ci   * @since 8
38561847f8eSopenharmony_ci   */
38661847f8eSopenharmony_ci  /**
38761847f8eSopenharmony_ci   * Returns a new Iterator object that contains the values contained in this map
38861847f8eSopenharmony_ci   *
38961847f8eSopenharmony_ci   * @returns { IterableIterator<V> }
39061847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The values method cannot be bound.
39161847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
39261847f8eSopenharmony_ci   * @crossplatform
39361847f8eSopenharmony_ci   * @since 10
39461847f8eSopenharmony_ci   */
39561847f8eSopenharmony_ci  /**
39661847f8eSopenharmony_ci   * Returns a new Iterator object that contains the values contained in this map
39761847f8eSopenharmony_ci   *
39861847f8eSopenharmony_ci   * @returns { IterableIterator<V> }
39961847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The values method cannot be bound.
40061847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
40161847f8eSopenharmony_ci   * @crossplatform
40261847f8eSopenharmony_ci   * @atomicservice
40361847f8eSopenharmony_ci   * @since 12
40461847f8eSopenharmony_ci   */
40561847f8eSopenharmony_ci  values(): IterableIterator<V>;
40661847f8eSopenharmony_ci  /**
40761847f8eSopenharmony_ci   * Replace the old value by new value corresponding to the specified key
40861847f8eSopenharmony_ci   *
40961847f8eSopenharmony_ci   * @param { K } key - key key Updated targets
41061847f8eSopenharmony_ci   * @param { V } newValue - newValue newValue Updated the target mapped value
41161847f8eSopenharmony_ci   * @returns { boolean } the boolean type(Is there a target pointed to by the key)
41261847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The replace method cannot be bound.
41361847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
41461847f8eSopenharmony_ci   * @since 8
41561847f8eSopenharmony_ci   */
41661847f8eSopenharmony_ci  /**
41761847f8eSopenharmony_ci   * Replace the old value by new value corresponding to the specified key
41861847f8eSopenharmony_ci   *
41961847f8eSopenharmony_ci   * @param { K } key - key key Updated targets
42061847f8eSopenharmony_ci   * @param { V } newValue - newValue newValue Updated the target mapped value
42161847f8eSopenharmony_ci   * @returns { boolean } the boolean type(Is there a target pointed to by the key)
42261847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The replace method cannot be bound.
42361847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
42461847f8eSopenharmony_ci   * @crossplatform
42561847f8eSopenharmony_ci   * @since 10
42661847f8eSopenharmony_ci   */
42761847f8eSopenharmony_ci  /**
42861847f8eSopenharmony_ci   * Replace the old value by new value corresponding to the specified key
42961847f8eSopenharmony_ci   *
43061847f8eSopenharmony_ci   * @param { K } key - key key Updated targets
43161847f8eSopenharmony_ci   * @param { V } newValue - newValue newValue Updated the target mapped value
43261847f8eSopenharmony_ci   * @returns { boolean } the boolean type(Is there a target pointed to by the key)
43361847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The replace method cannot be bound.
43461847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
43561847f8eSopenharmony_ci   * @crossplatform
43661847f8eSopenharmony_ci   * @atomicservice
43761847f8eSopenharmony_ci   * @since 12
43861847f8eSopenharmony_ci   */
43961847f8eSopenharmony_ci  replace(key: K, newValue: V): boolean;
44061847f8eSopenharmony_ci  /**
44161847f8eSopenharmony_ci   * Executes the given callback function once for each real key in the map.
44261847f8eSopenharmony_ci   * It does not perform functions on deleted keys
44361847f8eSopenharmony_ci   *
44461847f8eSopenharmony_ci   * @param { function } callbackFn - callbackFn
44561847f8eSopenharmony_ci   * callbackFn (required) A function that accepts up to three arguments.
44661847f8eSopenharmony_ci   * The function to be called for each element.
44761847f8eSopenharmony_ci   * @param { Object } [thisArg] - thisArg
44861847f8eSopenharmony_ci   * thisArg (Optional) The value to be used as this value for when callbackFn is called.
44961847f8eSopenharmony_ci   * If thisArg is omitted, undefined is used as the this value.
45061847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The forEach method cannot be bound.
45161847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
45261847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
45361847f8eSopenharmony_ci   * 2.Incorrect parameter types.
45461847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
45561847f8eSopenharmony_ci   * @since 8
45661847f8eSopenharmony_ci   */
45761847f8eSopenharmony_ci  /**
45861847f8eSopenharmony_ci   * Executes the given callback function once for each real key in the map.
45961847f8eSopenharmony_ci   * It does not perform functions on deleted keys
46061847f8eSopenharmony_ci   *
46161847f8eSopenharmony_ci   * @param { function } callbackFn - callbackFn
46261847f8eSopenharmony_ci   * callbackFn (required) A function that accepts up to three arguments.
46361847f8eSopenharmony_ci   * The function to be called for each element.
46461847f8eSopenharmony_ci   * @param { Object } [thisArg] - thisArg
46561847f8eSopenharmony_ci   * thisArg (Optional) The value to be used as this value for when callbackFn is called.
46661847f8eSopenharmony_ci   * If thisArg is omitted, undefined is used as the this value.
46761847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The forEach method cannot be bound.
46861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
46961847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
47061847f8eSopenharmony_ci   * 2.Incorrect parameter types.
47161847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
47261847f8eSopenharmony_ci   * @crossplatform
47361847f8eSopenharmony_ci   * @since 10
47461847f8eSopenharmony_ci   */
47561847f8eSopenharmony_ci  /**
47661847f8eSopenharmony_ci   * Executes the given callback function once for each real key in the map.
47761847f8eSopenharmony_ci   * It does not perform functions on deleted keys
47861847f8eSopenharmony_ci   *
47961847f8eSopenharmony_ci   * @param { function } callbackFn - callbackFn
48061847f8eSopenharmony_ci   * callbackFn (required) A function that accepts up to three arguments.
48161847f8eSopenharmony_ci   * The function to be called for each element.
48261847f8eSopenharmony_ci   * @param { Object } [thisArg] - thisArg
48361847f8eSopenharmony_ci   * thisArg (Optional) The value to be used as this value for when callbackFn is called.
48461847f8eSopenharmony_ci   * If thisArg is omitted, undefined is used as the this value.
48561847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The forEach method cannot be bound.
48661847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
48761847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
48861847f8eSopenharmony_ci   * 2.Incorrect parameter types.
48961847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
49061847f8eSopenharmony_ci   * @crossplatform
49161847f8eSopenharmony_ci   * @atomicservice
49261847f8eSopenharmony_ci   * @since 12
49361847f8eSopenharmony_ci   */
49461847f8eSopenharmony_ci  forEach(callbackFn: (value?: V, key?: K, map?: HashMap<K, V>) => void, thisArg?: Object): void;
49561847f8eSopenharmony_ci  /**
49661847f8eSopenharmony_ci   * Returns a new Iterator object that contains the [key, value] pairs for each element in the Map object in insertion order
49761847f8eSopenharmony_ci   *
49861847f8eSopenharmony_ci   * @returns { IterableIterator<[K, V]> }
49961847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The entries method cannot be bound.
50061847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
50161847f8eSopenharmony_ci   * @since 8
50261847f8eSopenharmony_ci   */
50361847f8eSopenharmony_ci  /**
50461847f8eSopenharmony_ci   * Returns a new Iterator object that contains the [key, value] pairs for each element in the Map object in insertion order
50561847f8eSopenharmony_ci   *
50661847f8eSopenharmony_ci   * @returns { IterableIterator<[K, V]> }
50761847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The entries method cannot be bound.
50861847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
50961847f8eSopenharmony_ci   * @crossplatform
51061847f8eSopenharmony_ci   * @since 10
51161847f8eSopenharmony_ci   */
51261847f8eSopenharmony_ci  /**
51361847f8eSopenharmony_ci   * Returns a new Iterator object that contains the [key, value] pairs for each element in the Map object in insertion order
51461847f8eSopenharmony_ci   *
51561847f8eSopenharmony_ci   * @returns { IterableIterator<[K, V]> }
51661847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The entries method cannot be bound.
51761847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
51861847f8eSopenharmony_ci   * @crossplatform
51961847f8eSopenharmony_ci   * @atomicservice
52061847f8eSopenharmony_ci   * @since 12
52161847f8eSopenharmony_ci   */
52261847f8eSopenharmony_ci  entries(): IterableIterator<[K, V]>;
52361847f8eSopenharmony_ci  /**
52461847f8eSopenharmony_ci   * returns an iterator.Each item of the iterator is a Javascript Object
52561847f8eSopenharmony_ci   *
52661847f8eSopenharmony_ci   * @returns { IterableIterator<[K, V]> }
52761847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound.
52861847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
52961847f8eSopenharmony_ci   * @since 8
53061847f8eSopenharmony_ci   */
53161847f8eSopenharmony_ci  /**
53261847f8eSopenharmony_ci   * returns an iterator.Each item of the iterator is a Javascript Object
53361847f8eSopenharmony_ci   *
53461847f8eSopenharmony_ci   * @returns { IterableIterator<[K, V]> }
53561847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound.
53661847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
53761847f8eSopenharmony_ci   * @crossplatform
53861847f8eSopenharmony_ci   * @since 10
53961847f8eSopenharmony_ci   */
54061847f8eSopenharmony_ci  /**
54161847f8eSopenharmony_ci   * returns an iterator.Each item of the iterator is a Javascript Object
54261847f8eSopenharmony_ci   *
54361847f8eSopenharmony_ci   * @returns { IterableIterator<[K, V]> }
54461847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound.
54561847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
54661847f8eSopenharmony_ci   * @crossplatform
54761847f8eSopenharmony_ci   * @atomicservice
54861847f8eSopenharmony_ci   * @since 12
54961847f8eSopenharmony_ci   */
55061847f8eSopenharmony_ci  [Symbol.iterator](): IterableIterator<[K, V]>;
55161847f8eSopenharmony_ci}
55261847f8eSopenharmony_ci
55361847f8eSopenharmony_ciexport default HashMap;
554