diff --git a/zh-cn/application-dev/reference/apis/js-apis-arraylist.md b/zh-cn/application-dev/reference/apis/js-apis-arraylist.md index 32ed121c683b63192f1d7a399678d1d627a45638..a0004ab25d3b0ebd422b3aa839065bead05b09d7 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-arraylist.md +++ b/zh-cn/application-dev/reference/apis/js-apis-arraylist.md @@ -17,14 +17,12 @@ ArrayList和[LinkedList](js-apis-linkedlist.md)相比,ArrayList的随机访问 import ArrayList from '@ohos.util.ArrayList'; ``` -## 系统能力 - -SystemCapability.Utils.Lang - ## ArrayList ### 属性 +**系统能力:** SystemCapability.Utils.Lang + | 名称 | 参数类型 | 可读 | 可写 | 说明 | | -------- | -------- | -------- | -------- | -------- | | length | number | 是 | 否 | ArrayList的元素个数。 | @@ -36,6 +34,8 @@ constructor() ArrayList的构造函数。 +**系统能力:** SystemCapability.Utils.Lang + **示例:** ```ts @@ -49,6 +49,8 @@ add(element: T): boolean 在ArrayList尾部插入元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -79,6 +81,8 @@ insert(element: T, index: number): void 在长度范围内任意位置插入指定元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -101,6 +105,8 @@ has(element: T): boolean 判断此ArrayList中是否含有该指定元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -128,6 +134,8 @@ getIndexOf(element: T): number 返回指定元素第一次出现时的下标值,查找失败返回-1。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -160,6 +168,8 @@ getLastIndexOf(element: T): number 返回指定元素最后一次出现时的下标值,查找失败返回-1。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -192,6 +202,8 @@ removeByIndex(index: number): T 根据元素的下标值查找元素,返回元素后将其删除。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -222,6 +234,8 @@ remove(element: T): boolean 删除查找到的第一个指定的元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -251,6 +265,8 @@ removeByRange(fromIndex: number, toIndex: number): void 从一段范围内删除元素,包括起始值但不包括终止值。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -278,6 +294,8 @@ thisArg?: Object): void 用户操作ArrayList中的元素,用操作后的元素替换原元素并返回操作后的元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -316,6 +334,8 @@ thisArg?: Object): void 通过回调函数来遍历ArrayList实例对象上的元素以及元素对应的下标。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -350,6 +370,8 @@ sort(comparator?: (firstValue: T, secondValue: T) => number): void 对ArrayList中的元素排序。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -382,6 +404,8 @@ subArrayList(fromIndex: number, toIndex: number): ArrayList<T> 根据下标截取ArrayList中的一段元素,并返回这一段ArrayList实例,包括起始值但不包括终止值。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -414,6 +438,8 @@ clear(): void 清除ArrayList中的所有元素,并把length置为0。 +**系统能力:** SystemCapability.Utils.Lang + **示例:** ```ts @@ -431,6 +457,8 @@ clone(): ArrayList<T> 克隆一个与ArrayList相同的实例,并返回克隆后的实例。修改克隆后的实例并不会影响原实例。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** @@ -455,6 +483,8 @@ getCapacity(): number 获取当前实例的容量大小。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -478,6 +508,8 @@ convertToArray(): Array<T> 把当前ArrayList实例转换成数组,并返回转换后的数组。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -501,6 +533,8 @@ isEmpty(): boolean 判断该ArrayList是否为空。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -524,6 +558,8 @@ increaseCapacityTo(newCapacity: number): void 如果传入的新容量大于或等于ArrayList中的元素个数,将容量变更为新容量。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -548,6 +584,8 @@ trimToCurrentLength(): void 把容量限制为当前的length大小。 +**系统能力:** SystemCapability.Utils.Lang + **示例:** ```ts @@ -565,6 +603,8 @@ arrayList.trimToCurrentLength(); 返回一个迭代器,迭代器的每一项都是一个 JavaScript 对象,并返回该对象。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | 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 55a23e451824e35d10f132b66d824b3032111121..2d9c75c123d52b61e90188541760f27d7234cfcf 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-deque.md +++ b/zh-cn/application-dev/reference/apis/js-apis-deque.md @@ -17,14 +17,12 @@ Deque和[Queue](js-apis-queue.md)相比,Queue的特点是先进先出,只能 import Deque from '@ohos.util.Deque'; ``` -## 系统能力 - -SystemCapability.Utils.Lang - ## Deque ### 属性 +**系统能力:** SystemCapability.Utils.Lang + | 名称 | 参数类型 | 可读 | 可写 | 说明 | | -------- | -------- | -------- | -------- | -------- | | length | number | 是 | 否 | Deque的元素个数。 | @@ -35,6 +33,8 @@ constructor() Deque的构造函数。 +**系统能力:** SystemCapability.Utils.Lang + **示例:** ```ts @@ -47,6 +47,8 @@ insertFront(element: T): void 在deque头部插入元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -71,6 +73,8 @@ insertEnd(element: T): void 在deque尾部插入元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -95,6 +99,8 @@ has(element: T): boolean 判断此Deque中是否含有该指定元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -122,6 +128,8 @@ popFirst(): T 删除并返回双端队列的首元素。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -146,6 +154,8 @@ popLast(): T 删除并返回双端队列的尾元素。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -171,6 +181,8 @@ thisArg?: Object): void 通过回调函数来遍历Deque实例对象上的元素以及元素对应的下标。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -205,6 +217,8 @@ getFirst(): T 获取Deque实例中的头元素。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -228,6 +242,8 @@ getLast(): T 获取Deque实例中的尾元素。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -249,9 +265,10 @@ let result = deque.getLast(); [Symbol.iterator]\(): IterableIterator<T> - 返回一个迭代器,迭代器的每一项都是一个 JavaScript 对象,并返回该对象。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | 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 d2f1d2f2ba7b20b45a6b390ee2cccb2b1af5630d..746176465576b85cd8c6e7b746bee81c767973db 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-hashmap.md +++ b/zh-cn/application-dev/reference/apis/js-apis-hashmap.md @@ -17,15 +17,12 @@ HashMap和[TreeMap](js-apis-treemap.md)相比,HashMap依据键的hashCode存 import HashMap from '@ohos.util.HashMap'; ``` -## 系统能力 - -SystemCapability.Utils.Lang - ## HashMap - ### 属性 +**系统能力:** SystemCapability.Utils.Lang + | 名称 | 参数类型 | 可读 | 可写 | 说明 | | -------- | -------- | -------- | -------- | -------- | | length | number | 是 | 否 | HashMap的元素个数。 | @@ -37,6 +34,8 @@ constructor() HashMap的构造函数。 +**系统能力:** SystemCapability.Utils.Lang + **示例:** ```ts @@ -50,6 +49,8 @@ isEmpty(): boolean 判断该HashMap是否为空。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -70,6 +71,8 @@ hasKey(key: K): boolean 判断此HashMap中是否含有该指定key。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -98,6 +101,8 @@ hasValue(value: V): boolean 判断此HashMap中是否含有该指定value。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -126,6 +131,8 @@ get(key: K): V 获取指定key所对应的value。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -154,6 +161,8 @@ setAll(map: HashMap): void 将一个HashMap中的所有元素组添加到另一个hashMap中。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -177,6 +186,8 @@ set(key: K, value: V): Object 向HashMap中添加一组数据。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -204,6 +215,8 @@ remove(key: K): V 删除指定key所对应元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -232,6 +245,8 @@ clear(): void 清除HashMap中的所有元素,并把length置为0。 +**系统能力:** SystemCapability.Utils.Lang + **示例:** ```ts @@ -248,6 +263,8 @@ keys(): IterableIterator<K> 返回包含此映射中包含的键名的新迭代器对象。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -275,6 +292,8 @@ values(): IterableIterator<V> 返回包含此映射中包含的键值的新迭代器对象。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -302,6 +321,8 @@ replace(key: K, newValue: V): boolean 对HashMap中一组数据进行更新(替换)。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -330,6 +351,8 @@ forEach(callbackfn: (value?: V, key?: K, map?: HashMap) => void, thisArg?: 通过回调函数来遍历HashMap实例对象上的元素以及元素对应的下标。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -362,6 +385,8 @@ entries(): IterableIterator<[K, V]> 返回包含此映射中包含的键值对的新迭代器对象。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -390,6 +415,8 @@ while(temp != undefined) { 返回一个迭代器,迭代器的每一项都是一个 JavaScript 对象,并返回该对象。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | diff --git a/zh-cn/application-dev/reference/apis/js-apis-hashset.md b/zh-cn/application-dev/reference/apis/js-apis-hashset.md index 2afbb46fcc4b061cd4d3c3ad9ea6fcffe63e28b4..fd7cf5eeb8db8842aa0ab7378a562593f768a790 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-hashset.md +++ b/zh-cn/application-dev/reference/apis/js-apis-hashset.md @@ -15,15 +15,12 @@ HashSet和[TreeSet](js-apis-treeset.md)相比,HashSet中的数据无序存放 import HashSet from '@ohos.util.HashSet'; ``` -## 系统能力 - -SystemCapability.Utils.Lang - ## HashSet - ### 属性 +**系统能力:** SystemCapability.Utils.Lang + | 名称 | 参数类型 | 可读 | 可写 | 说明 | | -------- | -------- | -------- | -------- | -------- | | length | number | 是 | 否 | HashSet的元素个数。 | @@ -35,6 +32,8 @@ constructor() HashSet的构造函数。 +**系统能力:** SystemCapability.Utils.Lang + **示例:** ```ts @@ -48,6 +47,8 @@ isEmpty(): boolean 判断该HashSet是否为空。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -68,6 +69,8 @@ has(value: T): boolean 判断此HashSet中是否含有该指定元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -96,6 +99,8 @@ add(value: T): boolean 向HashSet中添加数据。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -122,6 +127,8 @@ remove(value: T): boolean 删除指定的元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -150,6 +157,8 @@ clear(): void 清除HashSet中的所有元素,并把length置为0。 +**系统能力:** SystemCapability.Utils.Lang + **示例:** ```ts @@ -166,6 +175,8 @@ values(): IterableIterator<T> 返回包含此映射中包含的键值的新迭代器对象。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -193,6 +204,8 @@ forEach(callbackfn: (value?: T, key?: T, set?: HashSet<T>) => void, thisAr 通过回调函数来遍历实例对象上的元素以及元素对应的下标。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -224,6 +237,8 @@ entries(): IterableIterator<[T, T]> 返回包含此映射中包含的键值对的新迭代器对象。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -250,7 +265,9 @@ while(temp != undefined) { [Symbol.iterator]\(): IterableIterator<T> -返回一个迭代器,迭代器的每一项都是一个 JavaScript 对象,并返回该对象。 +返回一个迭代器,迭代器的每一项都是一个 JavaScript 对象,并返回该对象。 + +**系统能力:** SystemCapability.Utils.Lang **返回值:** diff --git a/zh-cn/application-dev/reference/apis/js-apis-lightweightmap.md b/zh-cn/application-dev/reference/apis/js-apis-lightweightmap.md index 3f744249d7df0e045ef1d5bd918518533c249de8..444b5e783b66ae99b2bdee8ef12b9bab03bb3133 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-lightweightmap.md +++ b/zh-cn/application-dev/reference/apis/js-apis-lightweightmap.md @@ -17,15 +17,14 @@ LightWeightMap和[HashMap](js-apis-hashmap.md)都是用来存储键值对的集 import LightWeightMap from '@ohos.util.LightWeightMap'; ``` -## 系统能力 -SystemCapability.Utils.Lang ## LightWeightMap - ### 属性 +**系统能力:** SystemCapability.Utils.Lang + | 名称 | 参数类型 | 可读 | 可写 | 说明 | | -------- | -------- | -------- | -------- | -------- | | length | number | 是 | 否 | LightWeightMap的元素个数。 | @@ -37,6 +36,8 @@ constructor() LightWeightMap的构造函数。 +**系统能力:** SystemCapability.Utils.Lang + **示例:** ```ts @@ -50,6 +51,8 @@ isEmpty(): boolean 判断该LightWeightMap是否为空。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -70,6 +73,8 @@ hasAll(map: LightWeightMap): boolean 判断此LightWeightMap中是否含有该指定map中的所有元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -100,6 +105,8 @@ hasKey(key: K): boolean; 判断此LightWeightMap中是否含有该指定key。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -129,6 +136,8 @@ hasValue(value: V): boolean 判断此LightWeightMap中是否含有该指定value。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -157,6 +166,8 @@ increaseCapacityTo(minimumCapacity: number): void 将当前LightWeightMap扩容至可以容纳指定数量元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -177,6 +188,8 @@ get(key: K): V 获取指定key所对应的value。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -205,6 +218,8 @@ getIndexOfKey(key: K): number 查找指定元素第一次出现的下标值,如果没有找到该元素返回-1。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -233,6 +248,8 @@ getIndexOfValue(value: V): number 查找指定元素第一次出现的下标值,如果没有找到该元素返回-1。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -261,6 +278,8 @@ getKeyAt(index: number): K 查找指定下标的元素键值对中key值,否则返回undefined。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -289,6 +308,8 @@ setAll(map: LightWeightMap): void 将一个LightWeightMap中的所有元素组添加到另一个lightWeightMap中。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -311,6 +332,8 @@ set(key: K, value: V): Object 向LightWeightMap中添加一组数据。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -338,6 +361,8 @@ remove(key: K): V 删除并返回指定key映射的元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -366,6 +391,8 @@ removeAt(index: number): boolean 删除指定下标对应的元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -394,6 +421,8 @@ setValueAt(index: number, newValue: V): boolean 替换指定下标对应键值对中的元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -423,6 +452,8 @@ getValueAt(index: number): V 获取指定下标对应键值对中的元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -451,6 +482,8 @@ clear(): void 清除LightWeightMap中的所有元素,并把length置为0。 +**系统能力:** SystemCapability.Utils.Lang + **示例:** ```ts @@ -467,6 +500,8 @@ keys(): IterableIterator<K> 返回包含此映射中包含的键的新迭代器对象。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -494,6 +529,8 @@ values(): IterableIterator<V> 返回包含此映射中包含的键值的新迭代器对象。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -521,6 +558,8 @@ forEach(callbackfn: (value?: V, key?: K, map?: LightWeightMap) => void, th 通过回调函数来遍历实例对象上的元素以及元素对应的下标。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -553,6 +592,8 @@ entries(): IterableIterator<[K, V]> 返回包含此映射中包含的键值对的新迭代器对象。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -580,6 +621,8 @@ toString(): String 将此映射中包含的键值对拼接成字符串,并返回字符串类型。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -601,6 +644,8 @@ toString(): String 返回一个迭代器,迭代器的每一项都是一个 JavaScript 对象,并返回该对象。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | diff --git a/zh-cn/application-dev/reference/apis/js-apis-lightweightset.md b/zh-cn/application-dev/reference/apis/js-apis-lightweightset.md index 30e415b36081838201f1709ce29b196980543094..a308d35203c30c1a5d69d27f2a8eb9d3ae5a99a7 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-lightweightset.md +++ b/zh-cn/application-dev/reference/apis/js-apis-lightweightset.md @@ -19,15 +19,14 @@ LightWeightSet和[HashSet](js-apis-hashset.md)都是用来存储键值的集合 import LightWeightSet from '@ohos.util.LightWeightSet'; ``` -## 系统能力 -SystemCapability.Utils.Lang ## LightWeightSet - ### 属性 +**系统能力:** SystemCapability.Utils.Lang + | 名称 | 参数类型 | 可读 | 可写 | 说明 | | -------- | -------- | -------- | -------- | -------- | | length | number | 是 | 否 | LightWeightSet的元素个数。 | @@ -39,6 +38,8 @@ constructor() LightWeightSet的构造函数。 +**系统能力:** SystemCapability.Utils.Lang + **示例:** ```ts @@ -52,6 +53,8 @@ isEmpty(): boolean 判断该容器是否为空。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -71,6 +74,8 @@ add(obj: T): boolean 向此容器中添加数据。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -97,6 +102,8 @@ addAll(set: LightWeightSet<T>): boolean 将另一个容器中的所有元素组添加到当前容器中。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -121,6 +128,8 @@ hasAll(set: LightWeightSet<T>): boolean 判断此容器中是否含有该指定set中的所有元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -151,6 +160,8 @@ has(key: T): boolean 判断此容器中是否含有该指定key。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -179,6 +190,8 @@ equal(obj: Object): boolean 判断此容器中是否含有该指定obj同类型的对象。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -208,6 +221,8 @@ increaseCapacityTo(minimumCapacity: number): void 将当前容器扩容至可以容纳指定数量元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -228,6 +243,8 @@ getIndexOf(key: T): number 获取指定key所对应的下标。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -256,6 +273,8 @@ remove(key: T): T 删除并返回指定key对应的元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -284,6 +303,8 @@ removeAt(index: number): boolean 删除指定下标所对应的元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -312,6 +333,8 @@ getValueAt(index: number): T 获取此容器中指定下标对应的元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -340,6 +363,8 @@ clear(): void 清除容器中的所有元素,并把length置为0。 +**系统能力:** SystemCapability.Utils.Lang + **示例:** ```ts @@ -356,6 +381,8 @@ toString(): String 获取包含容器中所有键和值的字符串。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -378,6 +405,8 @@ toArray(): Array<T> 获取包含此容器中所有对象的数组。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -400,6 +429,8 @@ values(): IterableIterator<T> 返回包含此映射中包含的键值的新迭代器对象。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -427,6 +458,8 @@ forEach(callbackfn: (value?: T, key?: T, set?: LightWeightSet<T>) => void, 通过回调函数来遍历LightWeightSet实例对象上的元素以及元素对应的下标。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -459,6 +492,8 @@ entries(): IterableIterator<[T, T]> 返回包含此映射中包含的键值对的新迭代器对象。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -486,6 +521,8 @@ while(index < lightWeightSet.length) { 返回一个迭代器,迭代器的每一项都是一个 JavaScript 对象,并返回该对象。 +**系统能力:** 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 bd08e4183627a3f346288161342d7e86ff80e64d..e5a46eae66cff08fd3999798718e74a954d28b46 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-linkedlist.md +++ b/zh-cn/application-dev/reference/apis/js-apis-linkedlist.md @@ -17,16 +17,15 @@ LinkedList和[ArrayList](js-apis-arraylist.md)相比,存取数据的效率不 import LinkedList from '@ohos.util.LinkedList'; ``` -## 系统能力 -SystemCapability.Utils.Lang ## LinkedList - ### 属性 +**系统能力:** SystemCapability.Utils.Lang + | 名称 | 参数类型 | 可读 | 可写 | 说明 | | -------- | -------- | -------- | -------- | -------- | | length | number | 是 | 否 | LinkedList的元素个数。 | @@ -38,6 +37,8 @@ constructor() LinkedList的构造函数。 +**系统能力:** SystemCapability.Utils.Lang + **示例:** @@ -52,6 +53,8 @@ add(element: T): boolean 在LinkedList尾部插入元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -82,6 +85,8 @@ addFirst(element: T): void 在LinkedList头部插入元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -106,6 +111,8 @@ insert(index: number, element: T): void 在长度范围内任意插入指定元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -128,6 +135,8 @@ has(element: T): boolean 判断此LinkedList中是否含有该指定元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -155,6 +164,8 @@ get(index: number): T 根据下标获取LinkedList中的元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -187,6 +198,8 @@ getLastIndexOf(element: T): number 返回指定元素最后一次出现时的下标值,查找失败返回-1。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -219,6 +232,8 @@ getIndexOf(element: T): number 返回指定元素第一次出现时的下标值,查找失败返回-1。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -251,6 +266,8 @@ removeByIndex(index: number): T 根据元素的下标值查找元素,返回元素后将其删除。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -281,6 +298,8 @@ removeFirst(): T 删除并返回LinkedList的第一个元素。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -305,6 +324,8 @@ removeLast(): T 删除并返回LinkedList的最后一个元素。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -329,6 +350,8 @@ remove(element: T): boolean 删除查找到的第一个指定的元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -358,6 +381,8 @@ removeFirstFound(element: T): boolean 删除第一次出现的指定元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -387,6 +412,8 @@ removeLastFound(element: T): boolean 删除最后一次出现的指定元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -416,6 +443,8 @@ clone(): LinkedList<T> 克隆一个与LinkedList相同的实例,并返回克隆后的实例。修改克隆后的实例并不会影响原实例。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -440,6 +469,8 @@ thisArg?: Object): void 通过回调函数来遍历LinkedList实例对象上的元素以及元素对应的下标。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -474,6 +505,8 @@ clear(): void 清除LinkedList中的所有元素,并把length置为0。 +**系统能力:** SystemCapability.Utils.Lang + **示例:** ```ts @@ -491,6 +524,8 @@ set(index: number, element: T): T 将此LinkedList中指定位置的元素替换为指定元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -521,6 +556,8 @@ convertToArray(): Array<T> 把当前LinkedList实例转换成数组,并返回转换后的数组。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -543,6 +580,8 @@ getFirst(): T 获取LinkedList实例中的第一个元素。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -566,6 +605,8 @@ getLast(): T 获取LinkedList实例中的最后一个元素。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -587,9 +628,10 @@ linkedList.getLast(); [Symbol.iterator]\(): IterableIterator<T> - 返回一个迭代器,迭代器的每一项都是一个 JavaScript 对象,并返回该对象。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | 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 57ab980dc2aecb77ca11e79655c8fd7142feecf6..bbb62d162dfa7a62eed3845750fba59a6921003c 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-list.md +++ b/zh-cn/application-dev/reference/apis/js-apis-list.md @@ -15,16 +15,13 @@ List和[LinkedList](js-apis-linkedlist.md)相比,LinkedList是双向链表, import List from '@ohos.util.List'; ``` -## 系统能力 - -SystemCapability.Utils.Lang - ## List - ### 属性 +**系统能力:** SystemCapability.Utils.Lang + | 名称 | 参数类型 | 可读 | 可写 | 说明 | | -------- | -------- | -------- | -------- | -------- | | length | number | 是 | 否 | List的元素个数。 | @@ -36,6 +33,8 @@ constructor() List的构造函数。 +**系统能力:** SystemCapability.Utils.Lang + **示例:** @@ -50,6 +49,8 @@ add(element: T): boolean 在List尾部插入元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -80,6 +81,8 @@ insert(element: T, index: number): void 在长度范围内任意位置插入指定元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -102,6 +105,8 @@ has(element: T): boolean 判断此List中是否含有该指定元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -129,6 +134,8 @@ get(index: number): T 根据下标获取List中的元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -161,6 +168,8 @@ getLastIndexOf(element: T): number 查找指定元素最后一次出现的下标值,查找失败返回-1。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -193,6 +202,8 @@ getIndexOf(element: T): number 查找指定元素第一次出现的下标值,查找失败返回-1。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -226,6 +237,8 @@ equal(obj: Object): boolean 比较指定对象与此List是否相等。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -261,6 +274,8 @@ removeByIndex(index: number): T 根据元素的下标值查找元素,返回元素后将其删除。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -291,6 +306,8 @@ remove(element: T): boolean 删除查找到的第一个指定的元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -321,6 +338,8 @@ thisArg?: Object): void 用户操作List中的元素,用操作后的元素替换原元素并返回操作后的元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -359,6 +378,8 @@ thisArg?: Object): void 通过回调函数来遍历List实例对象上的元素以及元素对应的下标。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -394,6 +415,8 @@ sort(comparator: (firstValue: T, secondValue: T) => number): void 对List中的元素进行一个排序操作。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -425,6 +448,8 @@ getSubList(fromIndex: number, toIndex: number): List<T> 根据下标截取List中的一段元素,并返回这一段List实例,包括起始值但不包括终止值。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -457,6 +482,8 @@ clear(): void 清除List中的所有元素,并把length置为0。 +**系统能力:** SystemCapability.Utils.Lang + **示例:** ```ts @@ -474,6 +501,8 @@ set(index: number, element: T): T 将此 List 中指定位置的元素替换为指定元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -505,6 +534,8 @@ convertToArray(): Array<T> 把当前List实例转换成数组,并返回转换后的数组。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -528,6 +559,8 @@ isEmpty(): boolean 判断该List是否为空。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -551,6 +584,8 @@ getFirst(): T 获取List实例中的第一个元素。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -574,6 +609,8 @@ getLast(): T 获取List实例中的最后一个元素。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -595,9 +632,10 @@ let result = list.getLast(); [Symbol.iterator]\(): IterableIterator<T> - 返回一个迭代器,迭代器的每一项都是一个 JavaScript 对象,并返回该对象。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | diff --git a/zh-cn/application-dev/reference/apis/js-apis-plainarray.md b/zh-cn/application-dev/reference/apis/js-apis-plainarray.md index 94b0e039ecd32d1f1bc9a452aa707b0fc47b56a9..2a96f5917a46f4c7d3bc2d868ca1b70b8893ff1f 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-plainarray.md +++ b/zh-cn/application-dev/reference/apis/js-apis-plainarray.md @@ -17,15 +17,14 @@ PlainArray和[LightWeightMap](js-apis-lightweightmap.md)都是用来存储键值 import PlainArray from '@ohos.util.PlainArray'; ``` -## 系统能力 -SystemCapability.Utils.Lang ## PlainArray - ### 属性 +**系统能力:** SystemCapability.Utils.Lang + | 名称 | 参数类型 | 可读 | 可写 | 说明 | | -------- | -------- | -------- | -------- | -------- | | length | number | 是 | 否 | PlainArray的元素个数。 | @@ -37,6 +36,8 @@ constructor() PlainArray的构造函数。 +**系统能力:** SystemCapability.Utils.Lang + **示例:** ```ts @@ -50,6 +51,8 @@ isEmpty(): boolean 判断该容器是否为空。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -70,6 +73,8 @@ has(key: number): boolean 判断此容器中是否含有该指定key。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -98,6 +103,8 @@ get(key: number): T 获取指定key所对应的value。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -126,6 +133,8 @@ getIndexOfKey(key: number): number 查找指定key第一次出现的下标值,如果没有找到该key返回-1。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -154,6 +163,8 @@ getIndexOfValue(value: T): number 查找指定value元素第一次出现的下标值,如果没有找到该value元素返回-1。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -182,6 +193,8 @@ getKeyAt(index: number): number 查找指定下标的元素键值对中key值。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -209,6 +222,8 @@ getValueAt(index: number): T 查找指定下标元素键值对中Value值,否则返回undefined。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -236,6 +251,8 @@ clone(): PlainArray<T> 克隆一个实例,并返回克隆后的实例。修改克隆后的实例并不会影响原实例。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -258,6 +275,8 @@ add(key: number, value: T): void 向容器中添加一组数据。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -279,6 +298,8 @@ remove(key: number): T 删除指定key对应元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -308,6 +329,8 @@ removeAt(index: number): T 删除指定下标对应的元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -337,6 +360,8 @@ removeRangeFrom(index: number, size: number): number 删除一定范围内的元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -366,6 +391,8 @@ setValueAt(index: number, value: T): void 替换容器中指定下标对应键值对中的键值。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -389,6 +416,8 @@ toString(): String 获取包含容器中所有键和值的字符串。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -411,6 +440,8 @@ clear(): void 清除容器中的所有元素,并把length置为0。 +**系统能力:** SystemCapability.Utils.Lang + **示例:** ```ts @@ -427,6 +458,8 @@ forEach(callbackfn: (value: T, index?: number, PlainArray?: PlainArray<T>) 通过回调函数来遍历实例对象上的元素以及元素对应的下标。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -459,6 +492,8 @@ plainArray.forEach((value, index) => { 返回一个迭代器,迭代器的每一项都是一个 JavaScript对象,并返回该对象。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | diff --git a/zh-cn/application-dev/reference/apis/js-apis-queue.md b/zh-cn/application-dev/reference/apis/js-apis-queue.md index 93f5c019af0c97d1af6e5bef1cc60eb6a1705773..b8d81d54e124889764a17782cc08ef27723f6ebf 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-queue.md +++ b/zh-cn/application-dev/reference/apis/js-apis-queue.md @@ -15,16 +15,13 @@ Queue和[Deque](js-apis-deque.md)相比,Queue只能在一端删除一端增加 import Queue from '@ohos.util.Queue'; ``` -## 系统能力 - -SystemCapability.Utils.Lang - ## Queue - ### 属性 +**系统能力:** SystemCapability.Utils.Lang + | 名称 | 参数类型 | 可读 | 可写 | 说明 | | -------- | -------- | -------- | -------- | -------- | | length | number | 是 | 否 | Queue的元素个数。 | @@ -36,6 +33,8 @@ constructor() Queue的构造函数。 +**系统能力:** SystemCapability.Utils.Lang + **示例:** ```ts @@ -49,6 +48,8 @@ add(element: T): boolean 在队列尾部插入元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -80,6 +81,8 @@ pop(): T 删除头元素并返回该删除元素。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -104,6 +107,8 @@ getFirst(): T 获取队列的头元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 类型 | 说明 | @@ -128,6 +133,8 @@ thisArg?: Object): void 通过回调函数来遍历Queue实例对象上的元素以及元素对应的下标。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -161,9 +168,10 @@ queue.forEach((value, index) => { [Symbol.iterator]\(): IterableIterator<T> - 返回一个迭代器,迭代器的每一项都是一个 JavaScript 对象,并返回该对象。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | diff --git a/zh-cn/application-dev/reference/apis/js-apis-stack.md b/zh-cn/application-dev/reference/apis/js-apis-stack.md index 2022d0685a0c67d663685349fb10017a41179b67..3f8acdad6738a2d96306d1c2583a4fabe275cc4f 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-stack.md +++ b/zh-cn/application-dev/reference/apis/js-apis-stack.md @@ -15,16 +15,15 @@ Stack和[Queue](js-apis-queue.md)相比,Queue基于循环队列实现,只能 import Stack from '@ohos.util.Stack'; ``` -## 系统能力 -SystemCapability.Utils.Lang ## Stack - ### 属性 +**系统能力:** SystemCapability.Utils.Lang + | 名称 | 参数类型 | 可读 | 可写 | 说明 | | -------- | -------- | -------- | -------- | -------- | | length | number | 是 | 否 | Stack的元素个数。 | @@ -36,6 +35,8 @@ constructor() Stack的构造函数。 +**系统能力:** SystemCapability.Utils.Lang + **示例:** ```ts @@ -49,6 +50,8 @@ push(item: T): T 在栈顶插入元素,并返回该元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -79,6 +82,8 @@ pop(): T 删除栈顶元素并返回该删除元素。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -103,6 +108,8 @@ peek(): T 获取并返回栈顶元素。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -126,6 +133,8 @@ locate(element: T): number 返回指定元素第一次出现时的下标值,查找失败返回-1。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -156,6 +165,8 @@ thisArg?: Object): void 通过回调函数来遍历Stack实例对象上的元素以及元素对应的下标。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -190,6 +201,8 @@ isEmpty(): boolean 判断该栈是否为空。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -211,9 +224,10 @@ let result = stack.isEmpty(); [Symbol.iterator]\(): IterableIterator<T> - 返回一个迭代器,迭代器的每一项都是一个 JavaScript 对象,并返回该对象。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | 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 ce2994b4a85746d7af4db65ce5ef8b0f6fdc0f54..e9507818321ae4ee853faaf870d9644b32f99cb7 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-treemap.md +++ b/zh-cn/application-dev/reference/apis/js-apis-treemap.md @@ -17,15 +17,12 @@ TreeMap和[HashMap](js-apis-treemap.md)相比,HashMap依据键的hashCode存 import TreeMap from '@ohos.util.TreeMap'; ``` -## 系统能力 - -SystemCapability.Utils.Lang - ## TreeMap - ### 属性 +**系统能力:** SystemCapability.Utils.Lang + | 名称 | 参数类型 | 可读 | 可写 | 说明 | | -------- | -------- | -------- | -------- | -------- | | length | number | 是 | 否 | TreeMap的元素个数。 | @@ -37,6 +34,8 @@ constructor(comparator?:(firstValue: K, secondValue: K) => boolean) TreeMap的构造函数。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -56,6 +55,8 @@ isEmpty(): boolean 判断该容器是否为空。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -76,6 +77,8 @@ hasKey(key: K): boolean 判断此容器中是否含有该指定key。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -104,6 +107,8 @@ hasValue(value: V): boolean 判断此容器中是否含有该指定value。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -132,6 +137,8 @@ get(key: K): V 获取指定key所对应的value。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -160,6 +167,8 @@ getFirstKey(): K 获取容器中排序第一的key。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -182,6 +191,8 @@ getLastKey(): K 获取容器中排序最后的key。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -204,6 +215,8 @@ setAll(map: TreeMap): void 将一个TreeMap中的所有元素组添加到另一个TreeMap中。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -227,6 +240,8 @@ set(key: K, value: V): Object 向容器中添加一组数据。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -254,6 +269,8 @@ remove(key: K): V 删除指定key对应的元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -282,6 +299,8 @@ getLowerKey(key: K): K 获取容器中比传入key排序靠前一位的key。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -311,6 +330,8 @@ getHigherKey(key: K): K 获取容器中比传入key排序靠后一位的key。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -339,6 +360,8 @@ replace(key: K, newValue: V): boolean 对容器中一组数据进行更新(替换)。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -367,6 +390,8 @@ clear(): void 清除容器中的所有元素,并把length置为0。 +**系统能力:** SystemCapability.Utils.Lang + **示例:** ```ts @@ -383,6 +408,8 @@ keys(): IterableIterator<K> 返回包含此映射中包含的键的新迭代器对象。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -410,6 +437,8 @@ values(): IterableIterator<V> 返回包含此映射中包含的键值的新迭代器对象。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -437,6 +466,8 @@ forEach(callbackfn: (value?: V, key?: K, map?: TreeMap) => void, thisArg?: 通过回调函数来遍历实例对象上的元素以及元素对应的下标。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -469,6 +500,8 @@ entries(): IterableIterator<[K, V]> 返回包含此映射中包含的键值对的新迭代器对象。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -495,9 +528,10 @@ while(temp != undefined) { [Symbol.iterator]\(): IterableIterator<[K, V]> - 返回一个迭代器,迭代器的每一项都是一个 JavaScript 对象,并返回该对象。 +**系统能力:** 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 386fe0ee88f635d6a1fca3fc5d18c518b7761a8f..0a6b7e9958902bc448b065f099cd6f86f8275cef 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-treeset.md +++ b/zh-cn/application-dev/reference/apis/js-apis-treeset.md @@ -15,15 +15,12 @@ TreeSet和[HashSet](js-apis-hashset.md)相比,HashSet中的数据无序存放 import TreeSet from '@ohos.util.TreeSet'; ``` -## 系统能力 - -SystemCapability.Utils.Lang - ## TreeSet - ### 属性 +**系统能力:** SystemCapability.Utils.Lang + | 名称 | 参数类型 | 可读 | 可写 | 说明 | | -------- | -------- | -------- | -------- | -------- | | length | number | 是 | 否 | TreeSet的元素个数。 | @@ -35,6 +32,8 @@ constructor(comparator?:(firstValue: T, secondValue: T) => boolean) TreeSet的构造函数。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -54,6 +53,8 @@ isEmpty(): boolean 判断该容器是否为空。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -74,6 +75,8 @@ has(value: T): boolean 判断此容器中是否含有该指定元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -102,6 +105,8 @@ getFirstValue(): T 获取容器中排序第一的数据。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -124,6 +129,8 @@ getLastValue(): T 获取容器中排序最后的数据。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -146,6 +153,8 @@ add(value: T): boolean 向容器中添加一组数据。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -172,6 +181,8 @@ remove(value: T): boolean 删除指定的元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -200,6 +211,8 @@ getLowerValue(key: T): T 获取容器中比传入元素排序靠前一位的元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -229,6 +242,8 @@ getHigherValue(key: T): T 获取容器中比传入元素排序靠后一位的元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -258,6 +273,8 @@ popFirst(): T 删除容器中排序最前的数据。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -280,6 +297,8 @@ popLast(): T 删除容器中排序最后的数据。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -302,6 +321,8 @@ clear(): void 清除容器中的所有元素,并把length置为0。 +**系统能力:** SystemCapability.Utils.Lang + **示例:** ```ts @@ -318,6 +339,8 @@ values(): IterableIterator<T> 返回包含此映射中包含的键值的新迭代器对象。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -345,6 +368,8 @@ forEach(callbackfn: (value?: T, key?: T, set?: TreeSet<T>) => void, thisAr 通过回调函数来遍历实例对象上的元素以及元素对应的下标。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -377,6 +402,8 @@ entries(): IterableIterator<[T, T]> 返回包含此映射中包含的键值对的新迭代器对象。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -403,9 +430,10 @@ while(temp != undefined) { [Symbol.iterator]\(): IterableIterator<T> - 返回一个迭代器,迭代器的每一项都是一个 JavaScript 对象,并返回该对象。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | diff --git a/zh-cn/application-dev/reference/apis/js-apis-vector.md b/zh-cn/application-dev/reference/apis/js-apis-vector.md index c76f4dc9b5e1a1f65deacd6f447e574253632a5e..d45bb5612d4093160da3d7c148d9e007353cf86b 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-vector.md +++ b/zh-cn/application-dev/reference/apis/js-apis-vector.md @@ -15,16 +15,13 @@ Vector和[ArrayList](js-apis-arraylist.md)相似,都是基于数组实现, import Vector from '@ohos.util.Vector'; ``` -## 系统能力 - -SystemCapability.Utils.Lang - ## Vector - ### 属性 +**系统能力:** SystemCapability.Utils.Lang + | 名称 | 参数类型 | 可读 | 可写 | 说明 | | -------- | -------- | -------- | -------- | -------- | | length | number | 是 | 否 | Vector的元素个数。 | @@ -36,6 +33,8 @@ constructor() Vector的构造函数。 +**系统能力:** SystemCapability.Utils.Lang + **示例:** ```ts @@ -49,6 +48,8 @@ add(element: T): boolean 在Vector中尾部插入元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -79,6 +80,8 @@ insert(element: T, index: number): void 在长度范围内任意插入指定元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -101,6 +104,8 @@ has(element: T): boolean 判断此Vector中是否含有该指定元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -120,7 +125,7 @@ let vector = new Vector(); let result = vector.has("Ahfbrgrbgnutfodgorrogorgrogofdfdf"); vector.add("Ahfbrgrbgnutfodgorrogorgrogofdfdf"); let result1 = vector.has("Ahfbrgrbgnutfodgorrogorgrogofdfdf"); -``` +``` ### getIndexOf @@ -128,6 +133,8 @@ getIndexOf(element: T): number 返回指定元素第一次出现时的下标值,查找失败返回-1。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -160,6 +167,8 @@ getLastIndexOf(element: T): number 返回指定元素最后一次出现时的下标值,查找失败返回-1。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -192,6 +201,8 @@ removeByIndex(index: number): T 根据元素的下标值查找元素,返回元素后将其删除。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -222,6 +233,8 @@ remove(element: T): boolean 删除查找到的第一个指定的元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -251,6 +264,8 @@ removeByRange(fromIndex: number, toIndex: number): void 从一段范围内删除元素,包括起始值但不包括终止值。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -278,6 +293,8 @@ thisArg?: Object): void 用户操作Vector中的元素,用操作后的元素替换原元素并返回操作后的元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -316,6 +333,8 @@ thisArg?: Object): void 通过回调函数来遍历Vector实例对象上的元素以及元素对应的下标。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -351,6 +370,8 @@ sort(comparator?: (firstValue: T, secondValue: T) => number): void 对Vector中的元素进行一个排序操作。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -383,6 +404,8 @@ subVector(fromIndex: number, toIndex: number): Vector<T> 根据下标截取Vector中的一段元素,并返回这一段vector实例,包括起始值但不包括终止值。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -416,6 +439,8 @@ clear(): void 清除Vector中的所有元素,并把length置为0。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** ```ts @@ -433,6 +458,8 @@ clone(): Vector<T> 克隆一个与Vector相同的实例,并返回克隆后的实例。修改克隆后的实例并不会影响原实例。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -456,6 +483,8 @@ getCapacity(): number 获取当前实例的容量大小。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -479,6 +508,8 @@ convertToArray(): Array<T> 把当前Vector实例转换成数组,并返回转换后的数组。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -502,6 +533,8 @@ isEmpty(): boolean 判断该Vector是否为空。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -525,6 +558,8 @@ increaseCapacityTo(newCapacity: number): void 如果传入的新容量大于或等于Vector中的元素个数,将容量变更为新容量。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -549,6 +584,8 @@ trimToCurrentLength(): void 把容量限制为当前的length大小。 +**系统能力:** SystemCapability.Utils.Lang + **示例:** ```ts @@ -566,6 +603,8 @@ toString(): string 用","将Vector实例中的元素按顺序拼接成字符串。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -589,6 +628,8 @@ copyToArray(array: Array<T>): void 将Vector实例中的元素按照下标复制到指定数组。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -613,6 +654,8 @@ getFirstElement(): T 获取实例中的第一个元素。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -636,6 +679,8 @@ getLastElement(): T 获取Vector实例中的最后一个元素。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | @@ -659,6 +704,8 @@ getLastIndexFrom(element: T, index: number): number 从指定索引向后搜索,返回该元素的下标索引。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -690,6 +737,8 @@ getIndexFrom(element: T, index: number): number 从指定索引向前搜索,返回该元素的下标索引。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -721,6 +770,8 @@ setLength(newSize: number): void 设置Vector实例的元素个数。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -745,6 +796,8 @@ get(index: number): T 根据下标值获取Vector实例中的元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -773,6 +826,8 @@ set(index: number, element: T): T 将此Vector中指定位置的元素替换为指定元素。 +**系统能力:** SystemCapability.Utils.Lang + **参数:** | 参数名 | 类型 | 必填 | 说明 | @@ -801,9 +856,10 @@ set(index: number, element: T): T [Symbol.iterator]\(): IterableIterator<T> - 返回一个迭代器,迭代器的每一项都是一个 JavaScript 对象,并返回该对象。 +**系统能力:** SystemCapability.Utils.Lang + **返回值:** | 类型 | 说明 | | -------- | -------- |