From d5a798266f88b05967132d6b204f83e2cb42f157 Mon Sep 17 00:00:00 2001 From: liu-ganlin Date: Sun, 9 Oct 2022 10:37:59 +0800 Subject: [PATCH] update container exception information Signed-off-by: liu-ganlin --- api/@ohos.util.ArrayList.d.ts | 74 +++++++++++++++--------------- api/@ohos.util.Deque.d.ts | 22 ++++----- api/@ohos.util.HashMap.d.ts | 36 +++++++-------- api/@ohos.util.HashSet.d.ts | 28 +++++------ api/@ohos.util.LightWeightMap.d.ts | 68 +++++++++++++-------------- api/@ohos.util.LightWeightSet.d.ts | 50 ++++++++++---------- api/@ohos.util.LinkedList.d.ts | 68 +++++++++++++-------------- api/@ohos.util.List.d.ts | 70 ++++++++++++++-------------- api/@ohos.util.PlainArray.d.ts | 64 +++++++++++++------------- api/@ohos.util.Queue.d.ts | 14 +++--- api/@ohos.util.Stack.d.ts | 18 ++++---- api/@ohos.util.TreeMap.d.ts | 46 +++++++++---------- api/@ohos.util.TreeSet.d.ts | 42 ++++++++--------- 13 files changed, 300 insertions(+), 300 deletions(-) diff --git a/api/@ohos.util.ArrayList.d.ts b/api/@ohos.util.ArrayList.d.ts index 3aca05135..547343ffb 100644 --- a/api/@ohos.util.ArrayList.d.ts +++ b/api/@ohos.util.ArrayList.d.ts @@ -16,7 +16,7 @@ declare class ArrayList { /** * A constructor used to create a ArrayList object. - * @throws {NewTargetIsNullError}: The ArrayList's constructor cannot be directly invoked. + * @throws { BusinessError } 10200012 - The ArrayList's constructor cannot be directly invoked. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -31,7 +31,7 @@ declare class ArrayList { * Appends the specified element to the end of this arraylist. * @param element to be appended to this arraylist * @returns the boolean type, returns true if the addition is successful, and returns false if it fails. - * @throws {ContainerBindError}: The add method cannot be bound. + * @throws { BusinessError } 10200011 - The add method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -42,9 +42,9 @@ declare class ArrayList { * any subsequent elements to the right (adds one to their index). * @param index index at which the specified element is to be inserted * @param element element to be inserted - * @throws {ContainerBindError}: The insert method cannot be bound. - * @throws {RangeError}: The value of "index" is out of range. It must be >= 0 && <= [this.length]. Received value is: [index] - * @throws {TypeError}: The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 10200011 - The insert method cannot be bound. + * @throws { BusinessError } 10200001 - The value of "index" is out of range. It must be >= 0 && <= [this.length]. Received value is: [index] + * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -53,7 +53,7 @@ declare class ArrayList { * Check if arraylist contains the specified element * @param element element to be contained * @return the boolean type,if arraylist contains the specified element,return true,else return false - * @throws {ContainerBindError}: The has method cannot be bound. + * @throws { BusinessError } 10200011 - The has method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -63,7 +63,7 @@ declare class ArrayList { * in this arraylist, or -1 if this arraylist does not contain the element. * @param element element to be contained * @return the number type ,returns the lowest index such that or -1 if there is no such index. - * @throws {ContainerBindError}: The getIndexOf method cannot be bound. + * @throws { BusinessError } 10200011 - The getIndexOf method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -73,9 +73,9 @@ declare class ArrayList { * delete the element, and move the index of all elements to the right of the element forward by one. * @param index the index in the arraylist * @return the T type ,returns undefined if arraylist is empty,If the index is - * @throws {ContainerBindError}: The removeByIndex method cannot be bound. - * @throws {RangeError}: The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] - * @throws {TypeError}: The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 10200011 - The removeByIndex method cannot be bound. + * @throws { BusinessError } 10200001 - The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] + * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -86,7 +86,7 @@ declare class ArrayList { * unchanged. More formally, removes the element with the lowest index * @param element element to remove * @return the boolean type ,If there is no such element, return false - * @throws {ContainerBindError}: The remove method cannot be bound. + * @throws { BusinessError } 10200011 - The remove method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -96,7 +96,7 @@ declare class ArrayList { * or -1 if the arraylist does not contain the element. * @param element element to find * @return the number type - * @throws {ContainerBindError}: The getLastIndexOf method cannot be bound. + * @throws { BusinessError } 10200011 - The getLastIndexOf method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -105,11 +105,11 @@ declare class ArrayList { * Removes from this arraylist all of the elements whose index is between fromIndex,inclusive,and toIndex ,exclusive. * @param fromIndex The starting position of the index, containing the value at that index position * @param toIndex the end of the index, excluding the value at that index - * @throws {ContainerBindError}: The removeByRange method cannot be bound. - * @throws {RangeError}: The value of "fromIndex" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [fromIndex] - * @throws {RangeError}: The value of "toIndex" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [toIndex] - * @throws {TypeError}: The type of "fromIndex" must be number. Received value is: [fromIndex] - * @throws {TypeError}: The type of "toIndex" must be number. Received value is: [toIndex] + * @throws { BusinessError } 10200011 - The removeByRange method cannot be bound. + * @throws { BusinessError } 10200001 - The value of "fromIndex" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [fromIndex] + * @throws { BusinessError } 10200001 - The value of "toIndex" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [toIndex] + * @throws { BusinessError } 401 - The type of "fromIndex" must be number. Received value is: [fromIndex] + * @throws { BusinessError } 401 - The type of "toIndex" must be number. Received value is: [toIndex] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -123,8 +123,8 @@ declare class ArrayList { * @param arrlist (Optional) The arraylist object to which the current element belongs. * @param thisArg (Optional) The value passed to the function generally uses the "this" value. * If this parameter is empty, "undefined" will be passed to the "this" value - * @throws {ContainerBindError}: The replaceAllElements method cannot be bound. - * @throws {TypeError}: The type of "callbackfn" must be callable. Received value is: [callbackfn] + * @throws { BusinessError } 10200011 - The replaceAllElements method cannot be bound. + * @throws { BusinessError } 401 - The type of "callbackfn" must be callable. Received value is: [callbackfn] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -139,8 +139,8 @@ declare class ArrayList { * @param arrlist (Optional) The arraylist object to which the current element belongs. * @param thisArg (Optional) The value passed to the function generally uses the "this" value. * If this parameter is empty, "undefined" will be passed to the "this" value - * @throws {ContainerBindError}: The forEach method cannot be bound. - * @throws {TypeError}: The type of "callbackfn" must be callable. Received value is: [callbackfn] + * @throws { BusinessError } 10200011 - The forEach method cannot be bound. + * @throws { BusinessError } 401 - The type of "callbackfn" must be callable. Received value is: [callbackfn] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -155,8 +155,8 @@ declare class ArrayList { * @param firstValue (Optional) previous element * @param secondValue (Optional) next elements * If this parameter is empty, it will default to ASCII sorting - * @throws {ContainerBindError}: The sort method cannot be bound. - * @throws {TypeError}: The type of "comparator" must be callable. Received value is: [comparator] + * @throws { BusinessError } 10200011 - The sort method cannot be bound. + * @throws { BusinessError } 401 - The type of "comparator" must be callable. Received value is: [comparator] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -165,11 +165,11 @@ declare class ArrayList { * Returns a view of the portion of this arraylist between the specified fromIndex,inclusize,and toIndex,exclusive * @param fromIndex The starting position of the index, containing the value at that index position * @param toIndex the end of the index, excluding the value at that index - * @throws {ContainerBindError}: The subArrayList method cannot be bound. - * @throws {RangeError}: The value of "fromIndex" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [fromIndex] - * @throws {RangeError}: The value of "toIndex" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [toIndex] - * @throws {TypeError}: The type of "fromIndex" must be number. Received value is: [fromIndex] - * @throws {TypeError}: The type of "toIndex" must be number. Received value is: [toIndex] + * @throws { BusinessError } 10200011 - The subArrayList method cannot be bound. + * @throws { BusinessError } 10200001 - The value of "fromIndex" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [fromIndex] + * @throws { BusinessError } 10200001 - The value of "toIndex" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [toIndex] + * @throws { BusinessError } 401 - The type of "fromIndex" must be number. Received value is: [fromIndex] + * @throws { BusinessError } 401 - The type of "toIndex" must be number. Received value is: [toIndex] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -177,7 +177,7 @@ declare class ArrayList { /** * Removes all of the elements from this arraylist.The arraylist will * be empty after this call returns.length becomes 0 - * @throws {ContainerBindError}: The clear method cannot be bound. + * @throws { BusinessError } 10200011 - The clear method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -185,7 +185,7 @@ declare class ArrayList { /** * Returns a shallow copy of this instance. (The elements themselves are not copied.) * @return this arraylist instance - * @throws {ContainerBindError}: The clone method cannot be bound. + * @throws { BusinessError } 10200011 - The clone method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -193,7 +193,7 @@ declare class ArrayList { /** * returns the capacity of this arraylist * @return the number type - * @throws {ContainerBindError}: The getCapacity method cannot be bound. + * @throws { BusinessError } 10200011 - The getCapacity method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -201,7 +201,7 @@ declare class ArrayList { /** * convert arraylist to array * @return the Array type - * @throws {ContainerBindError}: The convertToArray method cannot be bound. + * @throws { BusinessError } 10200011 - The convertToArray method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -209,7 +209,7 @@ declare class ArrayList { /** * Determine whether arraylist is empty and whether there is an element * @return the boolean type - * @throws {ContainerBindError}: The isEmpty method cannot be bound. + * @throws { BusinessError } 10200011 - The isEmpty method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -217,22 +217,22 @@ declare class ArrayList { /** * If the newCapacity provided by the user is greater than or equal to length, * change the capacity of the arraylist to newCapacity, otherwise the capacity will not be changed - * @throws {ContainerBindError}: The increaseCapacityTo method cannot be bound. - * @throws {TypeError}: The type of "newCapacity" must be number. Received value is: [newCapacity] + * @throws { BusinessError } 10200011 - The increaseCapacityTo method cannot be bound. + * @throws { BusinessError } 401 - The type of "newCapacity" must be number. Received value is: [newCapacity] * @since 8 * @syscap SystemCapability.Utils.Lang */ increaseCapacityTo(newCapacity: number): void; /** * Limit the capacity to the current length - * @throws {ContainerBindError}: The trimToCurrentLength method cannot be bound. + * @throws { BusinessError } 10200011 - The trimToCurrentLength method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ trimToCurrentLength(): void; /** * returns an iterator.Each item of the iterator is a Javascript Object - * @throws {ContainerBindError}: The Symbol.iterator method cannot be bound. + * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.Deque.d.ts b/api/@ohos.util.Deque.d.ts index 11a71336a..3b5e4f2fe 100644 --- a/api/@ohos.util.Deque.d.ts +++ b/api/@ohos.util.Deque.d.ts @@ -16,7 +16,7 @@ declare class Deque { /** * A constructor used to create a Deque object. - * @throws {NewTargetIsNullError}: The Deque's constructor cannot be directly invoked. + * @throws { BusinessError } 10200012 - The Deque's constructor cannot be directly invoked. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -30,7 +30,7 @@ declare class Deque { /** * Inserts an element into the deque header. * @param element to be appended to this deque - * @throws {ContainerBindError}: The insertFront method cannot be bound. + * @throws { BusinessError } 10200011 - The insertFront method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -38,7 +38,7 @@ declare class Deque { /** * Inserting an element at the end of a deque * @param element to be appended to this deque - * @throws {ContainerBindError}: The insertEnd method cannot be bound. + * @throws { BusinessError } 10200011 - The insertEnd method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -47,7 +47,7 @@ declare class Deque { * Check if deque contains the specified element * @param element element to be contained * @return the boolean type,if deque contains the specified element,return true,else return false - * @throws {ContainerBindError}: The has method cannot be bound. + * @throws { BusinessError } 10200011 - The has method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -55,7 +55,7 @@ declare class Deque { /** * Obtains the header element of a deque. * @return the T type - * @throws {ContainerBindError}: The getFirst method cannot be bound. + * @throws { BusinessError } 10200011 - The getFirst method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -63,7 +63,7 @@ declare class Deque { /** * Obtains the end element of a deque. * @return the T type - * @throws {ContainerBindError}: The getLast method cannot be bound. + * @throws { BusinessError } 10200011 - The getLast method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -71,7 +71,7 @@ declare class Deque { /** * Obtains the header element of a deque and delete the element. * @return the T type - * @throws {ContainerBindError}: The popFirst method cannot be bound. + * @throws { BusinessError } 10200011 - The popFirst method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -79,7 +79,7 @@ declare class Deque { /** * Obtains the end element of a deque and delete the element. * @return the T type - * @throws {ContainerBindError}: The popLast method cannot be bound. + * @throws { BusinessError } 10200011 - The popLast method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -92,8 +92,8 @@ declare class Deque { * @param deque (Optional) The deque object to which the current element belongs. * @param thisArg (Optional) The value passed to the function generally uses the "this" value. * If this parameter is empty, "undefined" will be passed to the "this" value - * @throws {TypeError}: The type of "callbackfn" must be callable. Received value is: [callbackfn] - * @throws {ContainerBindError}: The forEach method cannot be bound. + * @throws { BusinessError } 401 - The type of "callbackfn" must be callable. Received value is: [callbackfn] + * @throws { BusinessError } 10200011 - The forEach method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -101,7 +101,7 @@ declare class Deque { thisArg?: Object): void; /** * returns an iterator.Each item of the iterator is a Javascript Object - * @throws {ContainerBindError}: The Symbol.iterator method cannot be bound. + * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.HashMap.d.ts b/api/@ohos.util.HashMap.d.ts index e90c74aba..d89d33094 100644 --- a/api/@ohos.util.HashMap.d.ts +++ b/api/@ohos.util.HashMap.d.ts @@ -16,7 +16,7 @@ declare class HashMap { /** * A constructor used to create a HashMap object. - * @throws {NewTargetIsNullError}: The HashMap's constructor cannot be directly invoked. + * @throws { BusinessError } 10200012 - The HashMap's constructor cannot be directly invoked. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -30,7 +30,7 @@ declare class HashMap { /** * Returns whether the Map object contains elements * @return the boolean type - * @throws {ContainerBindError}: The isEmpty method cannot be bound. + * @throws { BusinessError } 10200011 - The isEmpty method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -39,7 +39,7 @@ declare class HashMap { * Returns whether a key is contained in this map * @param key need to determine whether to include the key * @return the boolean type - * @throws {ContainerBindError}: The hasKey method cannot be bound. + * @throws { BusinessError } 10200011 - The hasKey method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -48,7 +48,7 @@ declare class HashMap { * Returns whether a value is contained in this map * @param value need to determine whether to include the value * @return the boolean type - * @throws {ContainerBindError}: The hasValue method cannot be bound. + * @throws { BusinessError } 10200011 - The hasValue method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -57,7 +57,7 @@ declare class HashMap { * Returns a specified element in a Map object, or null if there is no corresponding element * @param key the index in HashMap * @return value or null - * @throws {ContainerBindError}: The get method cannot be bound. + * @throws { BusinessError } 10200011 - The get method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -65,8 +65,8 @@ declare class HashMap { /** * Adds all element groups in one map to another map * @param map the Map object to add members - * @throws {ContainerBindError}: The setAll method cannot be bound. - * @throws {TypeError}: The type of "map" must be HashMap. Received value is: [map] + * @throws { BusinessError } 10200011 - The setAll method cannot be bound. + * @throws { BusinessError } 401 - The type of "map" must be HashMap. Received value is: [map] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -76,8 +76,8 @@ declare class HashMap { * @param key Added or updated targets * @param value Added or updated value * @returns the map object after set - * @throws {ContainerBindError}: The set method cannot be bound. - * @throws {TypeError}: The type of "key" must be not null. Received value is: [key] + * @throws { BusinessError } 10200011 - The set method cannot be bound. + * @throws { BusinessError } 401 - The type of "key" must be not null. Received value is: [key] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -86,28 +86,28 @@ declare class HashMap { * Remove a specified element from a Map object * @param key Target to be deleted * @return Target mapped value - * @throws {ContainerBindError}: The remove method cannot be bound. + * @throws { BusinessError } 10200011 - The remove method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ remove(key: K): V; /** * Clear all element groups in the map - * @throws {ContainerBindError}: The clear method cannot be bound. + * @throws { BusinessError } 10200011 - The clear method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ clear(): void; /** * Returns a new Iterator object that contains the keys contained in this map - * @throws {ContainerBindError}: The keys method cannot be bound. + * @throws { BusinessError } 10200011 - The keys method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ keys(): IterableIterator; /** * Returns a new Iterator object that contains the values contained in this map - * @throws {ContainerBindError}: The values method cannot be bound. + * @throws { BusinessError } 10200011 - The values method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -117,7 +117,7 @@ declare class HashMap { * @param key Updated targets * @param newValue Updated the target mapped value * @returns the boolean type(Is there a target pointed to by the key) - * @throws {ContainerBindError}: The replace method cannot be bound. + * @throws { BusinessError } 10200011 - The replace method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -125,8 +125,8 @@ declare class HashMap { /** * Executes the given callback function once for each real key in the map. * It does not perform functions on deleted keys - * @throws {ContainerBindError}: The forEach method cannot be bound. - * @throws {TypeError}: The type of "callbackfn" must be callable. Received value is: [callbackfn] + * @throws { BusinessError } 10200011 - The forEach method cannot be bound. + * @throws { BusinessError } 401 - The type of "callbackfn" must be callable. Received value is: [callbackfn] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -134,14 +134,14 @@ declare class HashMap { thisArg?: Object): void; /** * Returns a new Iterator object that contains the [key, value] pairs for each element in the Map object in insertion order - * @throws {ContainerBindError}: The entries method cannot be bound. + * @throws { BusinessError } 10200011 - The entries method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ entries(): IterableIterator<[K, V]>; /** * returns an iterator.Each item of the iterator is a Javascript Object - * @throws {ContainerBindError}: The Symbol.iterator method cannot be bound. + * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.HashSet.d.ts b/api/@ohos.util.HashSet.d.ts index 478bb206b..8efc3a7d5 100644 --- a/api/@ohos.util.HashSet.d.ts +++ b/api/@ohos.util.HashSet.d.ts @@ -16,7 +16,7 @@ declare class HashSet { /** * A constructor used to create a HashSet object. - * @throws {NewTargetIsNullError}: The HashSet's constructor cannot be directly invoked. + * @throws { BusinessError } 10200012 - The HashSet's constructor cannot be directly invoked. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -30,7 +30,7 @@ declare class HashSet { /** * Returns whether the Set object contains elements * @return the boolean type - * @throws {ContainerBindError}: The isEmpty method cannot be bound. + * @throws { BusinessError } 10200011 - The isEmpty method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -39,8 +39,8 @@ declare class HashSet { * Returns whether the Set object contain s the elements * @param value need to determine whether to include the element * @return the boolean type - * @throws {ContainerBindError}: The has method cannot be bound. - * @throws {TypeError}: The type of "value" must be not null. Received value is: [value] + * @throws { BusinessError } 10200011 - The has method cannot be bound. + * @throws { BusinessError } 401 - The type of "value" must be not null. Received value is: [value] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -49,8 +49,8 @@ declare class HashSet { * If the set does not contain the element, the specified element is added * @param value Added element * @returns the boolean type(Is there contain this element) - * @throws {ContainerBindError}: The add method cannot be bound. - * @throws {TypeError}: The type of "value" must be not null. Received value is: [value] + * @throws { BusinessError } 10200011 - The add method cannot be bound. + * @throws { BusinessError } 401 - The type of "value" must be not null. Received value is: [value] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -59,23 +59,23 @@ declare class HashSet { * Remove a specified element from a Set object * @param value Target to be deleted * @return the boolean type(Is there contain this element) - * @throws {ContainerBindError}: The remove method cannot be bound. - * @throws {TypeError}: The type of "value" must be not null. Received value is: [value] + * @throws { BusinessError } 10200011 - The remove method cannot be bound. + * @throws { BusinessError } 401 - The type of "value" must be not null. Received value is: [value] * @since 8 * @syscap SystemCapability.Utils.Lang */ remove(value: T): boolean; /** * Clears all element groups in a set - * @throws {ContainerBindError}: The clear method cannot be bound. + * @throws { BusinessError } 10200011 - The clear method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ clear(): void; /** * Executes a provided function once for each value in the Set object. - * @throws {ContainerBindError}: The forEach method cannot be bound. - * @throws {TypeError}: The type of "callbackfn" must be callable. Received value is: [callbackfn] + * @throws { BusinessError } 10200011 - The forEach method cannot be bound. + * @throws { BusinessError } 401 - The type of "callbackfn" must be callable. Received value is: [callbackfn] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -83,21 +83,21 @@ declare class HashSet { thisArg?: Object): void; /** * Returns a new Iterator object that contains the values contained in this set - * @throws {ContainerBindError}: The values method cannot be bound. + * @throws { BusinessError } 10200011 - The values method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ values(): IterableIterator; /** * Returns a new Iterator object that contains the [key, value] pairs for each element in the Set object in insertion order - * @throws {ContainerBindError}: The entries method cannot be bound. + * @throws { BusinessError } 10200011 - The entries method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ entries(): IterableIterator<[T, T]>; /** * returns an iterator.Each item of the iterator is a Javascript Object - * @throws {ContainerBindError}: The Symbol.iterator method cannot be bound. + * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.LightWeightMap.d.ts b/api/@ohos.util.LightWeightMap.d.ts index b542d80b5..5090b2ffc 100644 --- a/api/@ohos.util.LightWeightMap.d.ts +++ b/api/@ohos.util.LightWeightMap.d.ts @@ -16,7 +16,7 @@ declare class LightWeightMap { /** * A constructor used to create a LightWeightMap object. - * @throws {NewTargetIsNullError}: The LightWeightMap's constructor cannot be directly invoked. + * @throws { BusinessError } 10200012 - The LightWeightMap's constructor cannot be directly invoked. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -31,8 +31,8 @@ declare class LightWeightMap { * Returns whether this map has all the object in a specified map * @param map the Map object to compare * @return the boolean type - * @throws {TypeError}: The type of "map" must be LightWeightMap. Received value is: [map] - * @throws {ContainerBindError}: The hasAll method cannot be bound. + * @throws { BusinessError } 401 - The type of "map" must be LightWeightMap. Received value is: [map] + * @throws { BusinessError } 10200011 - The hasAll method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -41,7 +41,7 @@ declare class LightWeightMap { * Returns whether a key is contained in this map * @param key need to determine whether to include the key * @return the boolean type - * @throws {ContainerBindError}: The hasKey method cannot be bound. + * @throws { BusinessError } 10200011 - The hasKey method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -50,7 +50,7 @@ declare class LightWeightMap { * Returns whether a value is contained in this map * @param value need to determine whether to include the value * @return the boolean type - * @throws {ContainerBindError}: The hasValue method cannot be bound. + * @throws { BusinessError } 10200011 - The hasValue method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -59,15 +59,15 @@ declare class LightWeightMap { * Ensures that the capacity of an LightWeightMap container is greater than or equal to a apecified value, * and that the container has all the original objects after capacity expansion * @param minimumCapacity Minimum capacity to be reserved - * @throws {ContainerBindError}: The increaseCapacityTo method cannot be bound. - * @throws {TypeError}: The type of "minimumCapacity" must be number. Received value is: [minimumCapacity] + * @throws { BusinessError } 10200011 - The increaseCapacityTo method cannot be bound. + * @throws { BusinessError } 401 - The type of "minimumCapacity" must be number. Received value is: [minimumCapacity] * @since 8 * @syscap SystemCapability.Utils.Lang */ increaseCapacityTo(minimumCapacity: number): void; /** * Returns a new Iterator object that contains the [key, value] pairs for each element in the Map object in insertion order - * @throws {ContainerBindError}: The entries method cannot be bound. + * @throws { BusinessError } 10200011 - The entries method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -76,7 +76,7 @@ declare class LightWeightMap { * Returns the value to which the specified key is mapped, or undefined if this map contains no mapping for the key * @param key the index in LightWeightMap * @return value or undefined - * @throws {ContainerBindError}: The get method cannot be bound. + * @throws { BusinessError } 10200011 - The get method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -85,7 +85,7 @@ declare class LightWeightMap { * Obtains the index of the key equal to a specified key in an LightWeightMap container * @param key Looking for goals * @return Subscript corresponding to target - * @throws {ContainerBindError}: The getIndexOfKey method cannot be bound. + * @throws { BusinessError } 10200011 - The getIndexOfKey method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -94,7 +94,7 @@ declare class LightWeightMap { * Obtains the index of the value equal to a specified value in an LightWeightMap container * @param value Looking for goals * @return Subscript corresponding to target - * @throws {ContainerBindError}: The getIndexOfValue method cannot be bound. + * @throws { BusinessError } 10200011 - The getIndexOfValue method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -102,7 +102,7 @@ declare class LightWeightMap { /** * Returns whether the Map object contains elements * @return the boolean type - * @throws {ContainerBindError}: The isEmpty method cannot be bound. + * @throws { BusinessError } 10200011 - The isEmpty method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -111,16 +111,16 @@ declare class LightWeightMap { * Obtains the key at the loaction identified by index in an LightWeightMap container * @param index Target subscript for search * @return the key of key-value pairs - * @throws {ContainerBindError}: The getKeyAt method cannot be bound. - * @throws {RangeError}: The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] - * @throws {TypeError}: The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 10200011 - The getKeyAt method cannot be bound. + * @throws { BusinessError } 10200001 - The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] + * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ getKeyAt(index: number): K; /** * Obtains a ES6 iterator that contains all the keys of an LightWeightMap container - * @throws {ContainerBindError}: The keys method cannot be bound. + * @throws { BusinessError } 10200011 - The keys method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -128,8 +128,8 @@ declare class LightWeightMap { /** * Adds all element groups in one map to another map * @param map the Map object to add members - * @throws {ContainerBindError}: The setAll method cannot be bound. - * @throws {TypeError}: The type of "map" must be LightWeightMap. Received value is: [map] + * @throws { BusinessError } 10200011 - The setAll method cannot be bound. + * @throws { BusinessError } 401 - The type of "map" must be LightWeightMap. Received value is: [map] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -139,7 +139,7 @@ declare class LightWeightMap { * @param key Added or updated targets * @param value Added or updated value * @returns the map object after set - * @throws {ContainerBindError}: The set method cannot be bound. + * @throws { BusinessError } 10200011 - The set method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -148,7 +148,7 @@ declare class LightWeightMap { * Remove the mapping for this key from this map if present * @param key Target to be deleted * @return Target mapped value - * @throws {ContainerBindError}: The remove method cannot be bound. + * @throws { BusinessError } 10200011 - The remove method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -157,8 +157,8 @@ declare class LightWeightMap { * Deletes a key-value pair at the loaction identified by index from an LightWeightMap container * @param index Target subscript for search * @return the boolean type(Is there a delete value) - * @throws {ContainerBindError}: The removeAt method cannot be bound. - * @throws {TypeError}: The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 10200011 - The removeAt method cannot be bound. + * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -166,7 +166,7 @@ declare class LightWeightMap { /** * Removes all of the mapping from this map * The map will be empty after this call returns - * @throws {ContainerBindError}: The clear method cannot be bound. + * @throws { BusinessError } 10200011 - The clear method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -176,9 +176,9 @@ declare class LightWeightMap { * @param index Target subscript for search * @param value Updated the target mapped value * @return the boolean type(Is there a value corresponding to the subscript) - * @throws {ContainerBindError}: The setValueAt method cannot be bound. - * @throws {RangeError}: The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] - * @throws {TypeError}: The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 10200011 - The setValueAt method cannot be bound. + * @throws { BusinessError } 10200001 - The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] + * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -186,8 +186,8 @@ declare class LightWeightMap { /** * Executes the given callback function once for each real key in the map. * It does not perform functions on deleted keys - * @throws {ContainerBindError}: The forEach method cannot be bound. - * @throws {TypeError}: The type of "callbackfn" must be callable. Received value is: [callbackfn] + * @throws { BusinessError } 10200011 - The forEach method cannot be bound. + * @throws { BusinessError } 401 - The type of "callbackfn" must be callable. Received value is: [callbackfn] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -195,14 +195,14 @@ declare class LightWeightMap { thisArg?: Object): void; /** * returns an ES6 iterator.Each item of the iterator is a Javascript Object - * @throws {ContainerBindError}: The Symbol.iterator method cannot be bound. + * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ [Symbol.iterator](): IterableIterator<[K, V]>; /** * Obtains a string that contains all the keys and values in an LightWeightMap container - * @throws {ContainerBindError}: The toString method cannot be bound. + * @throws { BusinessError } 10200011 - The toString method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -211,16 +211,16 @@ declare class LightWeightMap { * Obtains the value identified by index in an LightWeightMap container * @param index Target subscript for search * @return the value of key-value pairs - * @throws {ContainerBindError}: The getValueAt method cannot be bound. - * @throws {RangeError}: The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] - * @throws {TypeError}: The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 10200011 - The getValueAt method cannot be bound. + * @throws { BusinessError } 10200001 - The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] + * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ getValueAt(index: number): V; /** * Returns an iterator of the values contained in this map - * @throws {ContainerBindError}: The values method cannot be bound. + * @throws { BusinessError } 10200011 - The values method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.LightWeightSet.d.ts b/api/@ohos.util.LightWeightSet.d.ts index 7c8dc838b..1ea28f53e 100644 --- a/api/@ohos.util.LightWeightSet.d.ts +++ b/api/@ohos.util.LightWeightSet.d.ts @@ -16,7 +16,7 @@ declare class LightWeightSet { /** * A constructor used to create a LightWeightSet object. - * @throws {NewTargetIsNullError}: The LightWeightSet's constructor cannot be directly invoked. + * @throws { BusinessError } 10200012 - The LightWeightSet's constructor cannot be directly invoked. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -31,7 +31,7 @@ declare class LightWeightSet { * If the set does not contain the element, the specified element is added * @param value Added element * @returns the boolean type(Is there contain this element) - * @throws {ContainerBindError}: The add method cannot be bound. + * @throws { BusinessError } 10200011 - The add method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -40,8 +40,8 @@ declare class LightWeightSet { * Adds all the objects in a specified LightWeightSet container to the current LightWeightSet container * @param set the Set object to provide the added element * @returns the boolean type(Is there any new data added successfully) - * @throws {ContainerBindError}: The addAll method cannot be bound. - * @throws {TypeError}: The type of "set" must be LightWeightSet. Received value is: [set] + * @throws { BusinessError } 10200011 - The addAll method cannot be bound. + * @throws { BusinessError } 401 - The type of "set" must be LightWeightSet. Received value is: [set] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -50,8 +50,8 @@ declare class LightWeightSet { * Returns whether this set has all the object in a specified set * @param set the Set object to compare * @return the boolean type - * @throws {ContainerBindError}: The hasAll method cannot be bound. - * @throws {TypeError}: The type of "set" must be LightWeightSet. Received value is: [set] + * @throws { BusinessError } 10200011 - The hasAll method cannot be bound. + * @throws { BusinessError } 401 - The type of "set" must be LightWeightSet. Received value is: [set] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -60,7 +60,7 @@ declare class LightWeightSet { * Checks whether an LightWeightSet container has a specified key * @param key need to determine whether to include the key * @return the boolean type - * @throws {ContainerBindError}: The has method cannot be bound. + * @throws { BusinessError } 10200011 - The has method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -69,7 +69,7 @@ declare class LightWeightSet { * Checks whether an the objects of an LightWeighSet containeer are of the same type as a specified Object LightWeightSet * @param obj need to determine whether to include the obj * @return the boolean type - * @throws {ContainerBindError}: The equal method cannot be bound. + * @throws { BusinessError } 10200011 - The equal method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -78,9 +78,9 @@ declare class LightWeightSet { * Ensures that the capacity of an LightWeightSet container is greater than or equal to a apecified value, * and that the container has all the original objects after capacity expansion * @param minimumCapacity Minimum capacity to be reserved - * @throws {ContainerBindError}: The increaseCapacityTo method cannot be bound. - * @throws {TypeError}: The type of "minimumCapacity" must be number. Received value is: [minimumCapacity] - * @throws {RangeError}: The value of "minimumCapacity" is out of range. It must be > [currentCapacity]. Received value is: [minimumCapacity] + * @throws { BusinessError } 10200011 - The increaseCapacityTo method cannot be bound. + * @throws { BusinessError } 401 - The type of "minimumCapacity" must be number. Received value is: [minimumCapacity] + * @throws { BusinessError } 10200001 - The value of "minimumCapacity" is out of range. It must be > [currentCapacity]. Received value is: [minimumCapacity] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -89,7 +89,7 @@ declare class LightWeightSet { * Obtains the index of s key of a specified Object type in an LightWeightSet container * @param key Looking for goals * @return Subscript corresponding to target - * @throws {ContainerBindError}: The getIndexOf method cannot be bound. + * @throws { BusinessError } 10200011 - The getIndexOf method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -98,7 +98,7 @@ declare class LightWeightSet { * Deletes an object of a specified Object type from an LightWeightSet container * @param key Target to be deleted * @return Target element - * @throws {ContainerBindError}: The remove method cannot be bound. + * @throws { BusinessError } 10200011 - The remove method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -107,8 +107,8 @@ declare class LightWeightSet { * Deletes an object at the loaction identified by index from an LightWeightSet container * @param index Target subscript for search * @return the boolean type(Is there a delete value) - * @throws {ContainerBindError}: The removeAt method cannot be bound. - * @throws {TypeError}: The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 10200011 - The removeAt method cannot be bound. + * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -116,7 +116,7 @@ declare class LightWeightSet { /** * Removes all of the mapping from this map * The map will be empty after this call returns - * @throws {ContainerBindError}: The clear method cannot be bound. + * @throws { BusinessError } 10200011 - The clear method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -124,8 +124,8 @@ declare class LightWeightSet { /** * Executes the given callback function once for each real key in the map. * It does not perform functions on deleted keys - * @throws {ContainerBindError}: The forEach method cannot be bound. - * @throws {TypeError}: The type of "callbackfn" must be callable. Received value is: [callbackfn] + * @throws { BusinessError } 10200011 - The forEach method cannot be bound. + * @throws { BusinessError } 401 - The type of "callbackfn" must be callable. Received value is: [callbackfn] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -133,7 +133,7 @@ declare class LightWeightSet { thisArg?: Object): void; /** * returns an ES6 iterator.Each item of the iterator is a Javascript Object - * @throws {ContainerBindError}: The Symbol.iterator method cannot be bound. + * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -146,7 +146,7 @@ declare class LightWeightSet { toString(): String; /** * Obtains an Array that contains all the objects of an LightWeightSet container. - * @throws {ContainerBindError}: The toArray method cannot be bound. + * @throws { BusinessError } 10200011 - The toArray method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -155,29 +155,29 @@ declare class LightWeightSet { * Obtains the object at the location identified by index in an LightWeightSet container * @param index Target subscript for search * @return the value of key-value pairs - * @throws {ContainerBindError}: The getValueAt method cannot be bound. - * @throws {TypeError}: The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 10200011 - The getValueAt method cannot be bound. + * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ getValueAt(index: number): T; /** * Returns a ES6 iterator of the values contained in this Set - * @throws {ContainerBindError}: The values method cannot be bound. + * @throws { BusinessError } 10200011 - The values method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ values(): IterableIterator; /** * Returns a Iterator object that contains the [key, value] pairs for each element in the Set object in insertion order - * @throws {ContainerBindError}: The entries method cannot be bound. + * @throws { BusinessError } 10200011 - The entries method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ entries(): IterableIterator<[T, T]>; /** * Returns whether the set object contains elements - * @throws {ContainerBindError}: The isEmpty method cannot be bound. + * @throws { BusinessError } 10200011 - The isEmpty method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.LinkedList.d.ts b/api/@ohos.util.LinkedList.d.ts index e6166e5a2..6c6bd9df9 100644 --- a/api/@ohos.util.LinkedList.d.ts +++ b/api/@ohos.util.LinkedList.d.ts @@ -16,7 +16,7 @@ declare class LinkedList { /** * A constructor used to create a LinkedList object. - * @throws {NewTargetIsNullError}: The LinkedList's constructor cannot be directly invoked. + * @throws { BusinessError } 10200012 - The LinkedList's constructor cannot be directly invoked. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -31,7 +31,7 @@ declare class LinkedList { * Appends the specified element to the end of this linkedlist. * @param element to be appended to this linkedlist * @returns the boolean type, returns true if the addition is successful, and returns false if it fails. - * @throws {ContainerBindError}: The add method cannot be bound. + * @throws { BusinessError } 10200011 - The add method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -40,9 +40,9 @@ declare class LinkedList { * Inserts the specified element at the specified position in this linkedlist. * @param index index at which the specified element is to be inserted * @param element element to be inserted - * @throws {ContainerBindError}: The insert method cannot be bound. - * @throws {TypeError}: The type of "index" must be number. Received value is: [index] - * @throws {RangeError}: The value of "index" is out of range. It must be >= 0 && <= [this.length]. Received value is: [index] + * @throws { BusinessError } 10200011 - The insert method cannot be bound. + * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 10200001 - The value of "index" is out of range. It must be >= 0 && <= [this.length]. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -52,8 +52,8 @@ declare class LinkedList { * or returns undefined if this linkedlist is empty * @param index specified position * @return the T type - * @throws {ContainerBindError}: The get method cannot be bound. - * @throws {TypeError}: The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 10200011 - The get method cannot be bound. + * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -61,7 +61,7 @@ declare class LinkedList { /** * Inserts the specified element at the beginning of this LinkedList. * @param element the element to add - * @throws {ContainerBindError}: The addFirst method cannot be bound. + * @throws { BusinessError } 10200011 - The addFirst method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -69,8 +69,8 @@ declare class LinkedList { /** * Retrieves and removes the head (first element) of this linkedlist. * @return the head of this list - * @throws {ContainerBindError}: The removeFirst method cannot be bound. - * @throws {ContainerIsEmptyError} Container is Empty. + * @throws { BusinessError } 10200011 - The removeFirst method cannot be bound. + * @throws { BusinessError } 10200010 - Container is Empty. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -78,8 +78,8 @@ declare class LinkedList { /** * Removes and returns the last element from this linkedlist. * @return the head of this list - * @throws {ContainerBindError}: The removeLast method cannot be bound. - * @throws {ContainerIsEmptyError} Container is Empty. + * @throws { BusinessError } 10200011 - The removeLast method cannot be bound. + * @throws { BusinessError } 10200010 - Container is Empty. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -88,7 +88,7 @@ declare class LinkedList { * Check if linkedlist contains the specified element * @param element element to be contained * @return the boolean type,if linkedList contains the specified element,return true,else return false - * @throws {ContainerBindError}: The has method cannot be bound. + * @throws { BusinessError } 10200011 - The has method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -98,7 +98,7 @@ declare class LinkedList { * in this linkedlist, or -1 if this linkedlist does not contain the element. * @param element element to be contained * @return the number type ,returns the lowest index such that or -1 if there is no such index. - * @throws {ContainerBindError}: The getIndexOf method cannot be bound. + * @throws { BusinessError } 10200011 - The getIndexOf method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -108,9 +108,9 @@ declare class LinkedList { * @param index the index in the linkedlist * @return the T type ,returns undefined if linkedlist is empty,If the index is * out of bounds (greater than or equal to length or less than 0), throw an exception - * @throws {ContainerBindError}: The removeByIndex method cannot be bound. - * @throws {TypeError}: The type of "index" must be number. Received value is: [index] - * @throws {RangeError}: The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] + * @throws { BusinessError } 10200011 - The removeByIndex method cannot be bound. + * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 10200001 - The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -121,7 +121,7 @@ declare class LinkedList { * unchanged. More formally, removes the element with the lowest index * @param element element to remove * @return the boolean type ,If there is no such element, return false - * @throws {ContainerBindError}: The remove method cannot be bound. + * @throws { BusinessError } 10200011 - The remove method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -132,8 +132,8 @@ declare class LinkedList { * unchanged. More formally, removes the element with the lowest index * @param element element to remove * @return the boolean type ,If there is no such element, return false - * @throws {ContainerBindError}: The removeFirstFound method cannot be bound. - * @throws {ContainerIsEmptyError} Container is Empty. + * @throws { BusinessError } 10200011 - The removeFirstFound method cannot be bound. + * @throws { BusinessError } 10200010 - Container is Empty. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -144,8 +144,8 @@ declare class LinkedList { * unchanged. More formally, removes the element with the lowest index * @param element element to remove * @return the boolean type ,If there is no such element, return false - * @throws {ContainerBindError}: The removeLastFound method cannot be bound. - * @throws {ContainerIsEmptyError} Container is Empty. + * @throws { BusinessError } 10200011 - The removeLastFound method cannot be bound. + * @throws { BusinessError } 10200010 - Container is Empty. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -155,7 +155,7 @@ declare class LinkedList { * or -1 if the linkedlist does not contain the element. * @param element element to find * @return the number type - * @throws {ContainerBindError}: The getLastIndexOf method cannot be bound. + * @throws { BusinessError } 10200011 - The getLastIndexOf method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -164,7 +164,7 @@ declare class LinkedList { * Returns the first element (the item at index 0) of this linkedlist. * or returns undefined if linkedlist is empty * @return the T type ,returns undefined if linkedList is empty - * @throws {ContainerBindError}: The getFirst method cannot be bound. + * @throws { BusinessError } 10200011 - The getFirst method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -173,7 +173,7 @@ declare class LinkedList { * Returns the Last element (the item at index length-1) of this linkedlist. * or returns undefined if linkedlist is empty * @return the T type ,returns undefined if linkedList is empty - * @throws {ContainerBindError}: The getLast method cannot be bound. + * @throws { BusinessError } 10200011 - The getLast method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -183,9 +183,9 @@ declare class LinkedList { * @param element replaced element * @param index index to find * @return the T type ,returns undefined if linkedList is empty - * @throws {ContainerBindError}: The set method cannot be bound. - * @throws {RangeError}: The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] - * @throws {TypeError}: The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 10200011 - The set method cannot be bound. + * @throws { BusinessError } 10200001 - The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] + * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -199,8 +199,8 @@ declare class LinkedList { * @param LinkedList (Optional) The linkedlist object to which the current element belongs. * @param thisArg (Optional) The value passed to the function generally uses the "this" value. * If this parameter is empty, "undefined" will be passed to the "this" value - * @throws {ContainerBindError}: The forEach method cannot be bound. - * @throws {TypeError}: The type of "callbackfn" must be callable. Received value is: [callbackfn] + * @throws { BusinessError } 10200011 - The forEach method cannot be bound. + * @throws { BusinessError } 401 - The type of "callbackfn" must be callable. Received value is: [callbackfn] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -209,7 +209,7 @@ declare class LinkedList { /** * Removes all of the elements from this linkedlist.The linkedlist will * be empty after this call returns.length becomes 0 - * @throws {ContainerBindError}: The clear method cannot be bound. + * @throws { BusinessError } 10200011 - The clear method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -217,7 +217,7 @@ declare class LinkedList { /** * Returns a shallow copy of this instance. (The elements themselves are not copied.) * @return this linkedlist instance - * @throws {ContainerBindError}: The clone method cannot be bound. + * @throws { BusinessError } 10200011 - The clone method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -225,14 +225,14 @@ declare class LinkedList { /** * convert linkedlist to array * @return the Array type - * @throws {ContainerBindError}: The convertToArray method cannot be bound. + * @throws { BusinessError } 10200011 - The convertToArray method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ convertToArray(): Array; /** * returns an iterator.Each item of the iterator is a Javascript Object - * @throws {ContainerBindError}: The Symbol.iterator method cannot be bound. + * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.List.d.ts b/api/@ohos.util.List.d.ts index 24822675c..ef439cb8e 100644 --- a/api/@ohos.util.List.d.ts +++ b/api/@ohos.util.List.d.ts @@ -16,7 +16,7 @@ declare class List { /** * A constructor used to create a List object. - * @throws {NewTargetIsNullError}: The List's constructor cannot be directly invoked. + * @throws { BusinessError } 10200012 - The List's constructor cannot be directly invoked. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -31,7 +31,7 @@ declare class List { * Appends the specified element to the end of this list. * @param element to be appended to this list * @returns the boolean type, returns true if the addition is successful, and returns false if it fails. - * @throws {ContainerBindError}: The add method cannot be bound. + * @throws { BusinessError } 10200011 - The add method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -40,9 +40,9 @@ declare class List { * Inserts the specified element at the specified position in this list. * @param index index at which the specified element is to be inserted * @param element element to be inserted - * @throws {ContainerBindError}: The insert method cannot be bound. - * @throws {RangeError}: The value of "index" is out of range. It must be >= 0 && <= [this.length]. Received value is: [index] - * @throws {TypeError}: The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 10200011 - The insert method cannot be bound. + * @throws { BusinessError } 10200001 - The value of "index" is out of range. It must be >= 0 && <= [this.length]. Received value is: [index] + * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -52,8 +52,8 @@ declare class List { * or returns undefined if this list is empty * @param index specified position * @return the T type - * @throws {ContainerBindError}: The get method cannot be bound. - * @throws {TypeError}: The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 10200011 - The get method cannot be bound. + * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -62,7 +62,7 @@ declare class List { * Check if list contains the specified element * @param element element to be contained * @return the boolean type,if list contains the specified element,return true,else return false - * @throws {ContainerBindError}: The has method cannot be bound. + * @throws { BusinessError } 10200011 - The has method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -72,7 +72,7 @@ declare class List { * in this list, or -1 if this list does not contain the element. * @param element element to be contained * @return the number type ,returns the lowest index such that or -1 if there is no such index. - * @throws {ContainerBindError}: The getIndexOf method cannot be bound. + * @throws { BusinessError } 10200011 - The getIndexOf method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -82,9 +82,9 @@ declare class List { * @param index the index in the list * @return the T type ,returns undefined if list is empty,If the index is * out of bounds (greater than or equal to length or less than 0), throw an exception - * @throws {ContainerBindError}: The removeByIndex method cannot be bound. - * @throws {RangeError}: The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] - * @throws {TypeError}: The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 10200011 - The removeByIndex method cannot be bound. + * @throws { BusinessError } 10200001 - The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] + * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -95,7 +95,7 @@ declare class List { * unchanged. More formally, removes the element with the lowest index * @param element element to remove * @return the boolean type ,If there is no such element, return false - * @throws {ContainerBindError}: The remove method cannot be bound. + * @throws { BusinessError } 10200011 - The remove method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -105,7 +105,7 @@ declare class List { * or -1 if the list does not contain the element. * @param element element to find * @return the number type - * @throws {ContainerBindError}: The getLastIndexOf method cannot be bound. + * @throws { BusinessError } 10200011 - The getLastIndexOf method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -114,7 +114,7 @@ declare class List { * Returns the first element (the item at index 0) of this list. * or returns undefined if list is empty * @return the T type ,returns undefined if list is empty - * @throws {ContainerBindError}: The getFirst method cannot be bound. + * @throws { BusinessError } 10200011 - The getFirst method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -123,7 +123,7 @@ declare class List { * Returns the Last element (the item at index length-1) of this list. * or returns undefined if list is empty * @return the T type ,returns undefined if list is empty - * @throws {ContainerBindError}: The getLast method cannot be bound. + * @throws { BusinessError } 10200011 - The getLast method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -133,9 +133,9 @@ declare class List { * @param element replaced element * @param index index to find * @return the T type - * @throws {ContainerBindError}: The set method cannot be bound. - * @throws {RangeError}: The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] - * @throws {TypeError}: The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 10200011 - The set method cannot be bound. + * @throws { BusinessError } 10200001 - The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] + * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -145,7 +145,7 @@ declare class List { * return true, otherwise return false. * @param obj Compare objects * @return the boolean type - * @throws {ContainerBindError}: The equal method cannot be bound. + * @throws { BusinessError } 10200011 - The equal method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -159,8 +159,8 @@ declare class List { * @param List (Optional) The list object to which the current element belongs. * @param thisArg (Optional) The value passed to the function generally uses the "this" value. * If this parameter is empty, "undefined" will be passed to the "this" value - * @throws {ContainerBindError}: The forEach method cannot be bound. - * @throws {TypeError}: The type of "callbackfn" must be callable. Received value is: [callbackfn] + * @throws { BusinessError } 10200011 - The forEach method cannot be bound. + * @throws { BusinessError } 401 - The type of "callbackfn" must be callable. Received value is: [callbackfn] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -174,8 +174,8 @@ declare class List { * minus firstValue, it returns an list sorted in descending order; * @param firstValue (Optional) previous element * @param secondValue (Optional) next elements - * @throws {TypeError}: The type of "comparator" must be callable. Received value is: [comparator] - * @throws {ContainerBindError}: The sort method cannot be bound. + * @throws { BusinessError } 401 - The type of "comparator" must be callable. Received value is: [comparator] + * @throws { BusinessError } 10200011 - The sort method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -183,7 +183,7 @@ declare class List { /** * Removes all of the elements from this list.The list will * be empty after this call returns.length becomes 0 - * @throws {ContainerBindError}: The clear method cannot be bound. + * @throws { BusinessError } 10200011 - The clear method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -192,11 +192,11 @@ declare class List { * Returns a view of the portion of this list between the specified fromIndex,inclusize,and toIndex,exclusive * @param fromIndex The starting position of the index, containing the value at that index position * @param toIndex the end of the index, excluding the value at that index - * @throws {ContainerBindError}: The getSubList method cannot be bound. - * @throws {RangeError}: The value of "fromIndex" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [fromIndex] - * @throws {RangeError}: The value of "toIndex" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [toIndex] - * @throws {TypeError}: The type of "fromIndex" must be number. Received value is: [fromIndex] - * @throws {TypeError}: The type of "toIndex" must be number. Received value is: [toIndex] + * @throws { BusinessError } 10200011 - The getSubList method cannot be bound. + * @throws { BusinessError } 10200001 - The value of "fromIndex" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [fromIndex] + * @throws { BusinessError } 10200001 - The value of "toIndex" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [toIndex] + * @throws { BusinessError } 401 - The type of "fromIndex" must be number. Received value is: [fromIndex] + * @throws { BusinessError } 401 - The type of "toIndex" must be number. Received value is: [toIndex] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -210,8 +210,8 @@ declare class List { * @param list (Optional) The list object to which the current element belongs. * @param thisArg (Optional) The value passed to the function generally uses the "this" value. * If this parameter is empty, "undefined" will be passed to the "this" value - * @throws {ContainerBindError}: The replaceAllElements method cannot be bound. - * @throws {TypeError}: The type of "callbackfn" must be callable. Received value is: [callbackfn] + * @throws { BusinessError } 10200011 - The replaceAllElements method cannot be bound. + * @throws { BusinessError } 401 - The type of "callbackfn" must be callable. Received value is: [callbackfn] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -220,7 +220,7 @@ declare class List { /** * convert list to array * @return the Array type - * @throws {ContainerBindError}: The convertToArray method cannot be bound. + * @throws { BusinessError } 10200011 - The convertToArray method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -228,14 +228,14 @@ declare class List { /** * Determine whether list is empty and whether there is an element * @return the boolean type - * @throws {ContainerBindError}: The isEmpty method cannot be bound. + * @throws { BusinessError } 10200011 - The isEmpty method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ isEmpty(): boolean; /** * returns an iterator.Each item of the iterator is a Javascript Object - * @throws {ContainerBindError}: The Symbol.iterator method cannot be bound. + * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.PlainArray.d.ts b/api/@ohos.util.PlainArray.d.ts index cc9e9622a..bc4d45575 100644 --- a/api/@ohos.util.PlainArray.d.ts +++ b/api/@ohos.util.PlainArray.d.ts @@ -16,7 +16,7 @@ declare class PlainArray { /** * A constructor used to create a PlainArray object. - * @throws {NewTargetIsNullError}: The PlainArray's constructor cannot be directly invoked. + * @throws { BusinessError } 10200012 - The PlainArray's constructor cannot be directly invoked. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -31,22 +31,22 @@ declare class PlainArray { * Appends a key-value pair to PlainArray * @param key Added the key of key-value * @param value Added the value of key-value - * @throws {ContainerBindError}: The add method cannot be bound. - * @throws {TypeError}: The type of "key" must be number. Received value is: [key] + * @throws { BusinessError } 10200011 - The add method cannot be bound. + * @throws { BusinessError } 401 - The type of "key" must be number. Received value is: [key] * @since 8 * @syscap SystemCapability.Utils.Lang */ add(key: number, value: T): void; /** * Clears the current PlainArray object - * @throws {ContainerBindError}: The clear method cannot be bound. + * @throws { BusinessError } 10200011 - The clear method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ clear(): void; /** * Obtains a clone of the current PlainArray object - * @throws {ContainerBindError}: The clone method cannot be bound. + * @throws { BusinessError } 10200011 - The clone method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -55,8 +55,8 @@ declare class PlainArray { * Checks whether the current PlainArray object contains the specified key * @param key need to determine whether to include the key * @return the boolean type - * @throws {ContainerBindError}: The has method cannot be bound. - * @throws {TypeError}: The type of "key" must be number. Received value is: [key] + * @throws { BusinessError } 10200011 - The has method cannot be bound. + * @throws { BusinessError } 401 - The type of "key" must be number. Received value is: [key] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -65,8 +65,8 @@ declare class PlainArray { * Queries the value associated with the specified key * @param key Looking for goals * @return the value of key-value pairs - * @throws {ContainerBindError}: The get method cannot be bound. - * @throws {TypeError}: The type of "key" must be number. Received value is: [key] + * @throws { BusinessError } 10200011 - The get method cannot be bound. + * @throws { BusinessError } 401 - The type of "key" must be number. Received value is: [key] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -75,8 +75,8 @@ declare class PlainArray { * Queries the index for a specified key * @param key Looking for goals * @return Subscript corresponding to target - * @throws {ContainerBindError}: The getIndexOfKey method cannot be bound. - * @throws {TypeError}: The type of "key" must be number. Received value is: [key] + * @throws { BusinessError } 10200011 - The getIndexOfKey method cannot be bound. + * @throws { BusinessError } 401 - The type of "key" must be number. Received value is: [key] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -85,7 +85,7 @@ declare class PlainArray { * Queries the index for a specified value * @param value Looking for goals * @return Subscript corresponding to target - * @throws {ContainerBindError}: The getIndexOfValue method cannot be bound. + * @throws { BusinessError } 10200011 - The getIndexOfValue method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -93,7 +93,7 @@ declare class PlainArray { /** * Checks whether the current PlainArray object is empty * @return the boolean type - * @throws {ContainerBindError}: The isEmpty method cannot be bound. + * @throws { BusinessError } 10200011 - The isEmpty method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -102,8 +102,8 @@ declare class PlainArray { * Queries the key at a specified index * @param index Target subscript for search * @return the key of key-value pairs - * @throws {ContainerBindError}: The getKeyAt method cannot be bound. - * @throws {TypeError}: The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 10200011 - The getKeyAt method cannot be bound. + * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -112,8 +112,8 @@ declare class PlainArray { * Remove the key-value pair based on a specified key if it exists and return the value * @param key Target to be deleted * @return Target mapped value - * @throws {ContainerBindError}: The remove method cannot be bound. - * @throws {TypeError}: The type of "key" must be number. Received value is: [key] + * @throws { BusinessError } 10200011 - The remove method cannot be bound. + * @throws { BusinessError } 401 - The type of "key" must be number. Received value is: [key] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -122,8 +122,8 @@ declare class PlainArray { * Remove the key-value pair at a specified index if it exists and return the value * @param index Target subscript for search * @return the T type - * @throws {ContainerBindError}: The removeAt method cannot be bound. - * @throws {TypeError}: The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 10200011 - The removeAt method cannot be bound. + * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -133,9 +133,9 @@ declare class PlainArray { * @param index remove start index * @param size Expected deletion quantity * @return Actual deleted quantity - * @throws {ContainerBindError}: The removeRangeFrom method cannot be bound. - * @throws {RangeError}: The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] - * @throws {TypeError}: The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 10200011 - The removeRangeFrom method cannot be bound. + * @throws { BusinessError } 10200001 - The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] + * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -144,16 +144,16 @@ declare class PlainArray { * Update value on specified index * @param index Target subscript for search * @param value Updated the target mapped value - * @throws {ContainerBindError}: The setValueAt method cannot be bound. - * @throws {RangeError}: The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] - * @throws {TypeError}: The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 10200011 - The setValueAt method cannot be bound. + * @throws { BusinessError } 10200001 - The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] + * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ setValueAt(index: number, value: T): void; /** * Obtains the string representation of the PlainArray object - * @throws {ContainerBindError}: The toString method cannot be bound. + * @throws { BusinessError } 10200011 - The toString method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -162,17 +162,17 @@ declare class PlainArray { * Queries the value at a specified index * @param index Target subscript for search * @return the value of key-value pairs - * @throws {ContainerBindError}: The getValueAt method cannot be bound. - * @throws {RangeError}: The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] - * @throws {TypeError}: The type of "index" must be number. Received value is: [index] + * @throws { BusinessError } 10200011 - The getValueAt method cannot be bound. + * @throws { BusinessError } 10200001 - The value of "index" is out of range. It must be >= 0 && <= [this.length - 1]. Received value is: [index] + * @throws { BusinessError } 401 - The type of "index" must be number. Received value is: [index] * @since 8 * @syscap SystemCapability.Utils.Lang */ getValueAt(index: number): T; /** * Executes a provided function once for each value in the PlainArray object. - * @throws {ContainerBindError}: The forEach method cannot be bound. - * @throws {TypeError}: The type of "callbackfn" must be callable. Received value is: [callbackfn] + * @throws { BusinessError } 10200011 - The forEach method cannot be bound. + * @throws { BusinessError } 401 - The type of "callbackfn" must be callable. Received value is: [callbackfn] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -180,7 +180,7 @@ declare class PlainArray { thisArg?: Object): void; /** * returns an iterator.Each item of the iterator is a Javascript Object - * @throws {ContainerBindError}: The Symbol.iterator method cannot be bound. + * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.Queue.d.ts b/api/@ohos.util.Queue.d.ts index 4711a0172..a605ba12f 100644 --- a/api/@ohos.util.Queue.d.ts +++ b/api/@ohos.util.Queue.d.ts @@ -16,7 +16,7 @@ declare class Queue { /** * A constructor used to create a Queue object. - * @throws {NewTargetIsNullError}: The Queue's constructor cannot be directly invoked. + * @throws { BusinessError } 10200012 - The Queue's constructor cannot be directly invoked. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -32,7 +32,7 @@ declare class Queue { * so immediately without violating capacity restrictions. * @param element to be appended to this queue * @return the boolean type - * @throws {ContainerBindError}: The add method cannot be bound. + * @throws { BusinessError } 10200011 - The add method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -40,7 +40,7 @@ declare class Queue { /** * Obtains the header element of a queue. * @return the T type - * @throws {ContainerBindError}: The getFirst method cannot be bound. + * @throws { BusinessError } 10200011 - The getFirst method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -48,7 +48,7 @@ declare class Queue { /** * Retrieves and removes the head of this queue * @return the T type - * @throws {ContainerBindError}: The pop method cannot be bound. + * @throws { BusinessError } 10200011 - The pop method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -62,8 +62,8 @@ declare class Queue { * @param Queue (Optional) The queue object to which the current element belongs. * @param thisArg (Optional) The value passed to the function generally uses the "this" value. * If this parameter is empty, "undefined" will be passed to the "this" value - * @throws {ContainerBindError}: The forEach method cannot be bound. - * @throws {TypeError}: The type of "callbackfn" must be callable. Received value is: [callbackfn] + * @throws { BusinessError } 10200011 - The forEach method cannot be bound. + * @throws { BusinessError } 401 - The type of "callbackfn" must be callable. Received value is: [callbackfn] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -71,7 +71,7 @@ declare class Queue { thisArg?: Object): void; /** * returns an iterator.Each item of the iterator is a Javascript Object - * @throws {ContainerBindError}: The Symbol.iterator method cannot be bound. + * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.Stack.d.ts b/api/@ohos.util.Stack.d.ts index 3539b676b..811d1e10f 100644 --- a/api/@ohos.util.Stack.d.ts +++ b/api/@ohos.util.Stack.d.ts @@ -16,7 +16,7 @@ declare class Stack { /** * A constructor used to create a Stack object. - * @throws {NewTargetIsNullError}: The Stack's constructor cannot be directly invoked. + * @throws { BusinessError } 10200012 - The Stack's constructor cannot be directly invoked. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -30,7 +30,7 @@ declare class Stack { /** * Tests if this stack is empty * @return the boolean type - * @throws {ContainerBindError}: The isEmpty method cannot be bound. + * @throws { BusinessError } 10200011 - The isEmpty method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -39,7 +39,7 @@ declare class Stack { * Looks at the object at the top of this stack without removing it from the stack * Return undfined if this stack is empty * @return the top value or undefined - * @throws {ContainerBindError}: The peek method cannot be bound. + * @throws { BusinessError } 10200011 - The peek method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -48,7 +48,7 @@ declare class Stack { * Removes the object at the top of this stack and returns that object as the value of this function * an exception if the stack is empty * @returns Stack top value or undefined - * @throws {ContainerBindError}: The pop method cannot be bound. + * @throws { BusinessError } 10200011 - The pop method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -57,7 +57,7 @@ declare class Stack { * Pushes an item onto the top of this stack * @param item to be appended to this Stack * @returns the T type - * @throws {ContainerBindError}: The push method cannot be bound. + * @throws { BusinessError } 10200011 - The push method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -66,7 +66,7 @@ declare class Stack { * Returns the 1-based position where an object is on this stack * @param element Target to be deleted * @returns the T type,If there is no such element, return -1 - * @throws {ContainerBindError}: The locate method cannot be bound. + * @throws { BusinessError } 10200011 - The locate method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -80,8 +80,8 @@ declare class Stack { * @param stack (Optional) The Stack object to which the current element belongs. * @param thisArg (Optional) The value passed to the function generally uses the "this" value. * If this parameter is empty, "undefined" will be passed to the "this" value - * @throws {ContainerBindError}: The forEach method cannot be bound. - * @throws {TypeError}: The type of "callbackfn" must be callable. Received value is: [callbackfn] + * @throws { BusinessError } 10200011 - The forEach method cannot be bound. + * @throws { BusinessError } 401 - The type of "callbackfn" must be callable. Received value is: [callbackfn] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -89,7 +89,7 @@ declare class Stack { thisArg?: Object): void; /** * returns an ES6 iterator.Each item of the iterator is a Javascript Object - * @throws {ContainerBindError}: The Symbol.iterator method cannot be bound. + * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.TreeMap.d.ts b/api/@ohos.util.TreeMap.d.ts index 9bbc58ca6..aebdd248c 100644 --- a/api/@ohos.util.TreeMap.d.ts +++ b/api/@ohos.util.TreeMap.d.ts @@ -20,8 +20,8 @@ declare class TreeMap { * @param comparator (Optional) User-defined comparison functions * @param firstValue (Optional) previous element * @param secondValue (Optional) next element - * @throws {NewTargetIsNullError}: The TreeMap's constructor cannot be directly invoked. - * @throws {TypeError}: The type of "comparator" must be callable. Received value is: [comparator] + * @throws { BusinessError } 10200012 - The TreeMap's constructor cannot be directly invoked. + * @throws { BusinessError } 401 - The type of "comparator" must be callable. Received value is: [comparator] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -35,7 +35,7 @@ declare class TreeMap { /** * Returns whether the Map object contains elements * @return the boolean type - * @throws {ContainerBindError}: The isEmpty method cannot be bound. + * @throws { BusinessError } 10200011 - The isEmpty method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -44,7 +44,7 @@ declare class TreeMap { * Returns whether a key is contained in this map * @param key need to determine whether to include the key * @return the boolean type - * @throws {ContainerBindError}: The hasKey method cannot be bound. + * @throws { BusinessError } 10200011 - The hasKey method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -53,7 +53,7 @@ declare class TreeMap { * Returns whether a value is contained in this map * @param value need to determine whether to include the value * @return the boolean type - * @throws {ContainerBindError}: The hasValue method cannot be bound. + * @throws { BusinessError } 10200011 - The hasValue method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -62,7 +62,7 @@ declare class TreeMap { * Returns a specified element in a Map object, or null if there is no corresponding element * @param key the index in TreeMap * @return value or null - * @throws {ContainerBindError}: The get method cannot be bound. + * @throws { BusinessError } 10200011 - The get method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -71,7 +71,7 @@ declare class TreeMap { * Obtains the first sorted key in the treemap. * Or returns undefined if tree map is empty * @return value or undefined - * @throws {ContainerBindError}: The getFirstKey method cannot be bound. + * @throws { BusinessError } 10200011 - The getFirstKey method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -80,7 +80,7 @@ declare class TreeMap { * Obtains the last sorted key in the treemap. * Or returns undefined if tree map is empty * @return value or undefined - * @throws {ContainerBindError}: The getLastKey method cannot be bound. + * @throws { BusinessError } 10200011 - The getLastKey method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -88,8 +88,8 @@ declare class TreeMap { /** * Adds all element groups in one map to another map * @param map the Map object to add members - * @throws {ContainerBindError}: The setAll method cannot be bound. - * @throws {TypeError}: The type of "map" must be TreeMap. Received value is: [map] + * @throws { BusinessError } 10200011 - The setAll method cannot be bound. + * @throws { BusinessError } 401 - The type of "map" must be TreeMap. Received value is: [map] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -99,8 +99,8 @@ declare class TreeMap { * @param key Added or updated targets * @param value Added or updated value * @returns the map object after set - * @throws {ContainerBindError}: The set method cannot be bound. - * @throws {TypeError}: The type of "key" must be not null. Received value is: [key] + * @throws { BusinessError } 10200011 - The set method cannot be bound. + * @throws { BusinessError } 401 - The type of "key" must be not null. Received value is: [key] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -108,7 +108,7 @@ declare class TreeMap { /** * Remove a specified element from a Map object * @param key Target to be deleted - * @throws {ContainerBindError}: The remove method cannot be bound. + * @throws { BusinessError } 10200011 - The remove method cannot be bound. * @return Target mapped value * @since 8 * @syscap SystemCapability.Utils.Lang @@ -116,7 +116,7 @@ declare class TreeMap { remove(key: K): V; /** * Clear all element groups in the map - * @throws {ContainerBindError}: The clear method cannot be bound. + * @throws { BusinessError } 10200011 - The clear method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -125,7 +125,7 @@ declare class TreeMap { * Returns the greatest element smaller than or equal to the specified key * if the key does not exist, undefied is returned * @param key Objective of comparison - * @throws {ContainerBindError}: The getLowerKey method cannot be bound. + * @throws { BusinessError } 10200011 - The getLowerKey method cannot be bound. * @return key or undefined * @since 8 * @syscap SystemCapability.Utils.Lang @@ -136,21 +136,21 @@ declare class TreeMap { * if the key does not exist, undefied is returned * @param key Objective of comparison * @return key or undefined - * @throws {ContainerBindError}: The getHigherKey method cannot be bound. + * @throws { BusinessError } 10200011 - The getHigherKey method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ getHigherKey(key: K): K; /** * Returns a new Iterator object that contains the keys contained in this map - * @throws {ContainerBindError}: The keys method cannot be bound. + * @throws { BusinessError } 10200011 - The keys method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ keys(): IterableIterator; /** * Returns a new Iterator object that contains the values contained in this map - * @throws {ContainerBindError}: The values method cannot be bound. + * @throws { BusinessError } 10200011 - The values method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -160,7 +160,7 @@ declare class TreeMap { * @param key Updated targets * @param value Updated the target mapped value * @returns the boolean type(Is there a target pointed to by the key) - * @throws {ContainerBindError}: The replace method cannot be bound. + * @throws { BusinessError } 10200011 - The replace method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -168,8 +168,8 @@ declare class TreeMap { /** * Executes the given callback function once for each real key in the map. * It does not perform functions on deleted keys - * @throws {ContainerBindError}: The forEach method cannot be bound. - * @throws {TypeError}: The type of "callbackfn" must be callable. Received value is: [callbackfn] + * @throws { BusinessError } 10200011 - The forEach method cannot be bound. + * @throws { BusinessError } 401 - The type of "callbackfn" must be callable. Received value is: [callbackfn] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -177,14 +177,14 @@ declare class TreeMap { thisArg?: Object): void; /** * Returns a new Iterator object that contains the [key, value] pairs for each element in the Map object in insertion order - * @throws {ContainerBindError}: The entries method cannot be bound. + * @throws { BusinessError } 10200011 - The entries method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ entries(): IterableIterator<[K, V]>; /** * returns an ES6 iterator.Each item of the iterator is a Javascript Object - * @throws {ContainerBindError}: The Symbol.iterator method cannot be bound. + * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ diff --git a/api/@ohos.util.TreeSet.d.ts b/api/@ohos.util.TreeSet.d.ts index eabec4bb9..c1c9e26a1 100644 --- a/api/@ohos.util.TreeSet.d.ts +++ b/api/@ohos.util.TreeSet.d.ts @@ -19,8 +19,8 @@ declare class TreeSet { * @param comparator (Optional) User-defined comparison functions * @param firstValue (Optional) previous element * @param secondValue (Optional) next element - * @throws {NewTargetIsNullError}: The TreeSet's constructor cannot be directly invoked. - * @throws {TypeError}: The type of "comparator" must be callable. Received value is: [comparator] + * @throws { BusinessError } 10200012 - The TreeSet's constructor cannot be directly invoked. + * @throws { BusinessError } 401 - The type of "comparator" must be callable. Received value is: [comparator] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -34,7 +34,7 @@ declare class TreeSet { /** * Returns whether the Set object contains elements * @return the boolean type - * @throws {ContainerBindError}: The isEmpty method cannot be bound. + * @throws { BusinessError } 10200011 - The isEmpty method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -43,7 +43,7 @@ declare class TreeSet { * Returns whether the Set object contain s the elements * @param value need to determine whether to include the element * @return the boolean type - * @throws {ContainerBindError}: The has method cannot be bound. + * @throws { BusinessError } 10200011 - The has method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -52,8 +52,8 @@ declare class TreeSet { * If the set does not contain the element, the specified element is added * @param value Added element * @returns the boolean type(Is there contain this element) - * @throws {TypeError}: The type of "value" must be not null. Received value is: [value] - * @throws {ContainerBindError}: The add method cannot be bound. + * @throws { BusinessError } 401 - The type of "value" must be not null. Received value is: [value] + * @throws { BusinessError } 10200011 - The add method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -62,14 +62,14 @@ declare class TreeSet { * Remove a specified element from a Set object * @param value Target to be deleted * @return the boolean type(Is there contain this element) - * @throws {ContainerBindError}: The remove method cannot be bound. + * @throws { BusinessError } 10200011 - The remove method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ remove(value: T): boolean; /** * Clears all element groups in a set - * @throws {ContainerBindError}: The clear method cannot be bound. + * @throws { BusinessError } 10200011 - The clear method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -77,7 +77,7 @@ declare class TreeSet { /** * Gets the first elements in a set * @return value or undefined - * @throws {ContainerBindError}: The getFirstValue method cannot be bound. + * @throws { BusinessError } 10200011 - The getFirstValue method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -85,7 +85,7 @@ declare class TreeSet { /** * Gets the last elements in a set * @return value or undefined - * @throws {ContainerBindError}: The getLastValue method cannot be bound. + * @throws { BusinessError } 10200011 - The getLastValue method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -95,8 +95,8 @@ declare class TreeSet { * if the key does not exist, undefied is returned * @param key Objective of comparison * @return key or undefined - * @throws {ContainerBindError}: The getLowerValue method cannot be bound. - * @throws {TypeError}: The type of "key" must be not null. Received value is: [key] + * @throws { BusinessError } 10200011 - The getLowerValue method cannot be bound. + * @throws { BusinessError } 401 - The type of "key" must be not null. Received value is: [key] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -106,8 +106,8 @@ declare class TreeSet { * if the key does not exist, undefied is returned * @param key Objective of comparison * @return key or undefined - * @throws {ContainerBindError}: The getHigherValue method cannot be bound. - * @throws {TypeError}: The type of "key" must be not null. Received value is: [key] + * @throws { BusinessError } 10200011 - The getHigherValue method cannot be bound. + * @throws { BusinessError } 401 - The type of "key" must be not null. Received value is: [key] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -115,7 +115,7 @@ declare class TreeSet { /** * Return and delete the first element, returns undefined if tree set is empty * @return first value or undefined - * @throws {ContainerBindError}: The popFirst method cannot be bound. + * @throws { BusinessError } 10200011 - The popFirst method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -123,15 +123,15 @@ declare class TreeSet { /** * Return and delete the last element, returns undefined if tree set is empty * @return last value or undefined - * @throws {ContainerBindError}: The popLast method cannot be bound. + * @throws { BusinessError } 10200011 - The popLast method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ popLast(): T; /** * Executes a provided function once for each value in the Set object. - * @throws {ContainerBindError}: The forEach method cannot be bound. - * @throws {TypeError}: The type of "callbackfn" must be callable. Received value is: [callbackfn] + * @throws { BusinessError } 10200011 - The forEach method cannot be bound. + * @throws { BusinessError } 401 - The type of "callbackfn" must be callable. Received value is: [callbackfn] * @since 8 * @syscap SystemCapability.Utils.Lang */ @@ -139,21 +139,21 @@ declare class TreeSet { thisArg?: Object): void; /** * Returns a new Iterator object that contains the values contained in this set - * @throws {ContainerBindError}: The values method cannot be bound. + * @throws { BusinessError } 10200011 - The values method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ values(): IterableIterator; /** * Returns a new Iterator object that contains the [key, value] pairs for each element in the Set object in insertion order - * @throws {ContainerBindError}: The entries method cannot be bound. + * @throws { BusinessError } 10200011 - The entries method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */ entries(): IterableIterator<[T, T]>; /** * returns an ES6 iterator.Each item of the iterator is a Javascript Object - * @throws {ContainerBindError}: The Symbol.iterator method cannot be bound. + * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound. * @since 8 * @syscap SystemCapability.Utils.Lang */