diff --git a/zh-cn/application-dev/reference/apis/js-apis-deque.md b/zh-cn/application-dev/reference/apis/js-apis-deque.md index fb883ce8b75fbb500a79643429a808df723783ba..715851dcf78ed465e3cc06ad8698b2587bc54aa1 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-deque.md +++ b/zh-cn/application-dev/reference/apis/js-apis-deque.md @@ -1,8 +1,5 @@ # @ohos.util.Deque (线性容器Deque) -> **说明:** -> 本模块首批接口从API version 8开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 - Deque(double ended queue)根据循环队列的数据结构实现,符合先进先出以及先进后出的特点,支持两端的元素插入和移除。Deque会根据实际需要动态调整容量,每次进行两倍扩容。 Deque和[Queue](js-apis-queue.md)相比,Queue的特点是先进先出,只能在头部删除元素,尾部增加元素。 @@ -11,8 +8,13 @@ Deque和[Queue](js-apis-queue.md)相比,Queue的特点是先进先出,只能 **推荐使用场景:** 需要频繁在集合两端进行增删元素的操作时,推荐使用Deque。 -文档中存在泛型的使用,涉及以下泛型标记符:
-- T: Type, 类 +文档中存在泛型的使用,涉及以下泛型标记符:
+- T:Type, 类 + +> **说明:** +> +> 本模块首批接口从API version 8开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 + ## 导入模块 diff --git a/zh-cn/application-dev/reference/apis/js-apis-hashmap.md b/zh-cn/application-dev/reference/apis/js-apis-hashmap.md index d4bac07c3165bfdd8e7cd6bcc2f771bffc43cbce..58af2a38a1fbcbb7df92351d630ffc5994b0c74e 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-hashmap.md +++ b/zh-cn/application-dev/reference/apis/js-apis-hashmap.md @@ -1,8 +1,5 @@ # @ohos.util.HashMap (非线性容器HashMap) -> **说明:** -> 本模块首批接口从API version 8开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 - HashMap底层使用数组+链表+红黑树的方式实现,查询、插入和删除的效率都很高。HashMap存储内容基于key-value的键值对映射,不能有重复的key,且一个key只能对应一个value。 HashMap和[TreeMap](js-apis-treemap.md)相比,HashMap依据键的hashCode存取数据,访问速度较快。而TreeMap是有序存取,效率较低。 @@ -11,9 +8,14 @@ HashMap和[TreeMap](js-apis-treemap.md)相比,HashMap依据键的hashCode存 **推荐使用场景:** 需要快速存取、删除以及插入键值对数据时,推荐使用HashMap。 -文档中存在泛型的使用,涉及以下泛型标记符:
-- K: Key, 键
-- V: Value, 值 +文档中存在泛型的使用,涉及以下泛型标记符:
+- K:Key,键
+- V:Value,值 + +> **说明:** +> +> 本模块首批接口从API version 8开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 + ## 导入模块 @@ -337,7 +339,7 @@ hashMap.clear(); keys(): IterableIterator<K> -返回包含此映射中包含的键名的新迭代器对象。 +返回包含此映射中包含的键的新迭代器对象。 **系统能力:** SystemCapability.Utils.Lang diff --git a/zh-cn/application-dev/reference/apis/js-apis-linkedlist.md b/zh-cn/application-dev/reference/apis/js-apis-linkedlist.md index 17317ee22534a529e150a7bf39f3f34895802292..332740e7b5c1915dac8a257051c8196a6fffa472 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-linkedlist.md +++ b/zh-cn/application-dev/reference/apis/js-apis-linkedlist.md @@ -1,8 +1,5 @@ # @ohos.util.LinkedList (线性容器LinkedList) -> **说明:** -> 本模块首批接口从API version 8开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 - LinkedList底层通过双向链表实现,双向链表的每个节点都包含对前一个元素和后一个元素的引用。当需要查询元素时,可以从头遍历,也可以从尾部遍历,插入、删除效率高,查询效率低。LinkedList允许元素为null。 LinkedList和[List](js-apis-list.md)相比,LinkedList是双向链表,可以快速地在头尾进行增删,而List是单向链表,无法双向操作。 @@ -11,8 +8,13 @@ LinkedList和[ArrayList](js-apis-arraylist.md)相比,插入数据效率LinkedL **推荐使用场景:** 当需要频繁的插入删除时,推荐使用LinkedList高效操作。 -文档中存在泛型的使用,涉及以下泛型标记符:
-- T: Type, 类 +文档中存在泛型的使用,涉及以下泛型标记符:
+- T: Type,类 + +> **说明:** +> +> 本模块首批接口从API version 8开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 + ## 导入模块 @@ -505,6 +507,7 @@ removeFirstFound(element: T): boolean | -------- | -------- | | 10200011 | The removeFirstFound method cannot be bound. | | 10200010 | Container is empty. | +| 10200017 | The element does not exist in this container. | **示例:** @@ -545,6 +548,7 @@ removeLastFound(element: T): boolean | -------- | -------- | | 10200011 | The removeLastFound method cannot be bound. | | 10200010 | Container is empty. | +| 10200017 | The element does not exist in this container. | **示例:** diff --git a/zh-cn/application-dev/reference/apis/js-apis-list.md b/zh-cn/application-dev/reference/apis/js-apis-list.md index 60535897fdd5b43b9b79e641a6ed67f53a307a29..3acc747e39ed657ecf90916023c73ff95998b88e 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-list.md +++ b/zh-cn/application-dev/reference/apis/js-apis-list.md @@ -1,16 +1,17 @@ # @ohos.util.List (线性容器List) -> **说明:** -> 本模块首批接口从API version 8开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 - List底层通过单向链表实现,每个节点有一个指向后一个元素的引用。当需要查询元素时,必须从头遍历,插入、删除效率高,查询效率低。List允许元素为null。 List和[LinkedList](js-apis-linkedlist.md)相比,LinkedList是双向链表,可以快速地在头尾进行增删,而List是单向链表,无法双向操作。 **推荐使用场景:** 当需要频繁的插入删除时,推荐使用List高效操作。 -文档中存在泛型的使用,涉及以下泛型标记符:
-- T: Type, 类 +文档中存在泛型的使用,涉及以下泛型标记符:
+- T:Type, 类 + +> **说明:** +> +> 本模块首批接口从API version 8开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 ## 导入模块 diff --git a/zh-cn/application-dev/reference/apis/js-apis-treemap.md b/zh-cn/application-dev/reference/apis/js-apis-treemap.md index eb8d83f1e094027bfa33fc45f11041eb30d4566b..99fabdacb010daf46b1a27fac7c5cb854ea59d42 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-treemap.md +++ b/zh-cn/application-dev/reference/apis/js-apis-treemap.md @@ -566,7 +566,7 @@ while(temp != undefined) { values(): IterableIterator<V> -返回包含此映射中键值对的新迭代器对象。 +返回包含此映射中键值的新迭代器对象。 **系统能力:** SystemCapability.Utils.Lang diff --git a/zh-cn/application-dev/reference/apis/js-apis-treeset.md b/zh-cn/application-dev/reference/apis/js-apis-treeset.md index 5452620b579d1ae02e0ff9f695b72c0d1662b6dd..68308be6ea45a4fd308249862805fb51df018f41 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-treeset.md +++ b/zh-cn/application-dev/reference/apis/js-apis-treeset.md @@ -438,7 +438,7 @@ treeSet.clear(); values(): IterableIterator<T> -返回包含此映射中键值对的新迭代器对象。 +返回包含此映射中键值的新迭代器对象。 **系统能力:** SystemCapability.Utils.Lang diff --git a/zh-cn/application-dev/reference/errorcodes/errorcode-utils.md b/zh-cn/application-dev/reference/errorcodes/errorcode-utils.md index 9dd0d2ccf0650a53e9cb60f9db1f538834b71590..eab38038d22bcd536f7a131261296cb16e652600 100644 --- a/zh-cn/application-dev/reference/errorcodes/errorcode-utils.md +++ b/zh-cn/application-dev/reference/errorcodes/errorcode-utils.md @@ -272,4 +272,22 @@ The task is running when cancel it. **处理步骤** -取消任务前,确保任务已被执行完毕。 \ No newline at end of file +取消任务前,确保任务已被执行完毕。 + +## 10200017 删除不存在的元素错误 + +**错误信息** + +The element does not exist in this container. + +**错误描述** + +删除的元素不存在此容器中。 + +**可能原因** + +删除元素时,此容器中不存在此元素。 + +**处理步骤** + +删除元素前,确保元素存在于此容器中。 \ No newline at end of file