Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
8a2bbe63
D
Docs
项目概览
OpenHarmony
/
Docs
大约 1 年 前同步成功
通知
159
Star
292
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
8a2bbe63
编写于
4月 29, 2022
作者:
O
openharmony_ci
提交者:
Gitee
4月 29, 2022
浏览文件
操作
浏览文件
下载
差异文件
!3541 Add language type description in doc file
Merge pull request !3541 from wangyong/thirteenDocs
上级
73180797
128d8392
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
253 addition
and
253 deletion
+253
-253
zh-cn/application-dev/reference/apis/js-apis-arraylist.md
zh-cn/application-dev/reference/apis/js-apis-arraylist.md
+22
-22
zh-cn/application-dev/reference/apis/js-apis-deque.md
zh-cn/application-dev/reference/apis/js-apis-deque.md
+11
-11
zh-cn/application-dev/reference/apis/js-apis-hashmap.md
zh-cn/application-dev/reference/apis/js-apis-hashmap.md
+16
-16
zh-cn/application-dev/reference/apis/js-apis-hashset.md
zh-cn/application-dev/reference/apis/js-apis-hashset.md
+12
-12
zh-cn/application-dev/reference/apis/js-apis-lightweightmap.md
.../application-dev/reference/apis/js-apis-lightweightmap.md
+24
-24
zh-cn/application-dev/reference/apis/js-apis-lightweightset.md
.../application-dev/reference/apis/js-apis-lightweightset.md
+20
-20
zh-cn/application-dev/reference/apis/js-apis-linkedlist.md
zh-cn/application-dev/reference/apis/js-apis-linkedlist.md
+23
-23
zh-cn/application-dev/reference/apis/js-apis-list.md
zh-cn/application-dev/reference/apis/js-apis-list.md
+22
-22
zh-cn/application-dev/reference/apis/js-apis-plainarray.md
zh-cn/application-dev/reference/apis/js-apis-plainarray.md
+19
-19
zh-cn/application-dev/reference/apis/js-apis-queue.md
zh-cn/application-dev/reference/apis/js-apis-queue.md
+7
-7
zh-cn/application-dev/reference/apis/js-apis-stack.md
zh-cn/application-dev/reference/apis/js-apis-stack.md
+9
-9
zh-cn/application-dev/reference/apis/js-apis-treemap.md
zh-cn/application-dev/reference/apis/js-apis-treemap.md
+20
-20
zh-cn/application-dev/reference/apis/js-apis-treeset.md
zh-cn/application-dev/reference/apis/js-apis-treeset.md
+17
-17
zh-cn/application-dev/reference/apis/js-apis-vector.md
zh-cn/application-dev/reference/apis/js-apis-vector.md
+31
-31
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-arraylist.md
浏览文件 @
8a2bbe63
...
...
@@ -5,7 +5,7 @@
## 导入模块
```
```
ts
import
ArrayList
from
'
@ohos.util.ArrayList
'
```
...
...
@@ -30,7 +30,7 @@ ArrayList的构造函数。
**示例:**
```
```
ts
let
arrayList
=
new
ArrayList
();
```
...
...
@@ -55,7 +55,7 @@ add(element: T): boolean
**示例:**
```
```
ts
let
arrayList
=
new
ArrayList
();
let
result
=
arrayList
.
add
(
"
a
"
);
let
result1
=
arrayList
.
add
(
1
);
...
...
@@ -80,7 +80,7 @@ insert(element: T, index: number): void
**示例:**
```
```
ts
let
arrayList
=
new
ArrayList
();
arrayList
.
insert
(
"
A
"
,
0
);
arrayList
.
insert
(
0
,
1
);
...
...
@@ -107,7 +107,7 @@ has(element: T): boolean
**示例:**
```
```
ts
let
arrayList
=
new
ArrayList
();
let
result
=
arrayList
.
has
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
);
arrayList
.
add
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
);
...
...
@@ -134,7 +134,7 @@ getIndexOf(element: T): number
**示例:**
```
```
ts
let
arrayList
=
new
ArrayList
();
arrayList
.
add
(
2
);
arrayList
.
add
(
4
);
...
...
@@ -166,7 +166,7 @@ getLastIndexOf(element: T): number
**示例:**
```
```
ts
let
arrayList
=
new
ArrayList
();
arrayList
.
add
(
2
);
arrayList
.
add
(
4
);
...
...
@@ -198,7 +198,7 @@ removeByIndex(index: number): T
**示例:**
```
```
ts
let
arrayList
=
new
ArrayList
();
arrayList
.
add
(
2
);
arrayList
.
add
(
4
);
...
...
@@ -228,7 +228,7 @@ remove(element: T): boolean
**示例:**
```
```
ts
let
arrayList
=
new
ArrayList
();
arrayList
.
add
(
2
);
arrayList
.
add
(
4
);
...
...
@@ -252,7 +252,7 @@ removeByRange(fromIndex: number, toIndex: number): void
**示例:**
```
```
ts
let
arrayList
=
new
ArrayList
();
arrayList
.
add
(
2
);
arrayList
.
add
(
4
);
...
...
@@ -287,7 +287,7 @@ callbackfn的参数说明:
**示例:**
```
```
ts
let
arrayList
=
new
ArrayList
();
arrayList
.
add
(
2
);
arrayList
.
add
(
4
);
...
...
@@ -325,7 +325,7 @@ callbackfn的参数说明:
**示例:**
```
```
ts
let
arrayList
=
new
ArrayList
();
arrayList
.
add
(
2
);
arrayList
.
add
(
4
);
...
...
@@ -357,7 +357,7 @@ comparator的参数说明:
**示例:**
```
```
ts
let
arrayList
=
new
ArrayList
();
arrayList
.
add
(
2
);
arrayList
.
add
(
4
);
...
...
@@ -389,7 +389,7 @@ subArrayList(fromIndex: number, toIndex: number): ArrayList<T>
**示例:**
```
```
ts
let
arrayList
=
new
ArrayList
();
arrayList
.
add
(
2
);
arrayList
.
add
(
4
);
...
...
@@ -408,7 +408,7 @@ clear(): void
**示例:**
```
```
ts
let
arrayList
=
new
ArrayList
();
arrayList
.
add
(
2
);
arrayList
.
add
(
4
);
...
...
@@ -432,7 +432,7 @@ clone(): ArrayList<T>
**示例:**
```
```
ts
let
arrayList
=
new
ArrayList
();
arrayList
.
add
(
2
);
arrayList
.
add
(
4
);
...
...
@@ -455,7 +455,7 @@ getCapacity(): number
**示例:**
```
```
ts
let
arrayList
=
new
ArrayList
();
arrayList
.
add
(
2
);
arrayList
.
add
(
4
);
...
...
@@ -478,7 +478,7 @@ convertToArray(): Array<T>
**示例:**
```
```
ts
let
arrayList
=
new
ArrayList
();
arrayList
.
add
(
2
);
arrayList
.
add
(
4
);
...
...
@@ -501,7 +501,7 @@ isEmpty(): boolean
**示例:**
```
```
ts
let
arrayList
=
new
ArrayList
();
arrayList
.
add
(
2
);
arrayList
.
add
(
4
);
...
...
@@ -524,7 +524,7 @@ increaseCapacityTo(newCapacity: number): void
**示例:**
```
```
ts
let
arrayList
=
new
ArrayList
();
arrayList
.
add
(
2
);
arrayList
.
add
(
4
);
...
...
@@ -542,7 +542,7 @@ trimToCurrentLength(): void
**示例:**
```
```
ts
let
arrayList
=
new
ArrayList
();
arrayList
.
add
(
2
);
arrayList
.
add
(
4
);
...
...
@@ -565,7 +565,7 @@ arrayList.trimToCurrentLength();
**示例:**
```
```
ts
let
arrayList
=
new
ArrayList
();
arrayList
.
add
(
2
);
arrayList
.
add
(
4
);
...
...
zh-cn/application-dev/reference/apis/js-apis-deque.md
浏览文件 @
8a2bbe63
...
...
@@ -6,7 +6,7 @@
## 导入模块
```
```
ts
import
Deque
from
'
@ohos.util.Deque
'
```
...
...
@@ -30,7 +30,7 @@ Deque的构造函数。
**示例:**
```
```
ts
let
deque
=
new
Deque
();
```
...
...
@@ -48,7 +48,7 @@ insertFront(element: T): void
**示例:**
```
```
ts
let
deque
=
new
Deque
();
deque
.
insertFront
(
"
a
"
);
deque
.
insertFront
(
1
);
...
...
@@ -72,7 +72,7 @@ insertEnd(element: T): void
**示例:**
```
```
ts
let
deque
=
new
Deque
();
deque
.
insertEnd
(
"
a
"
);
deque
.
insertEnd
(
1
);
...
...
@@ -102,7 +102,7 @@ has(element: T): boolean
**示例:**
```
```
ts
let
deque
=
new
Deque
();
let
result
=
deque
.
has
(
"
Ahfbrgrbgnutfodgorrogorg
"
);
deque
.
insertFront
(
"
Ahfbrgrbgnutfodgorrogorg
"
);
...
...
@@ -123,7 +123,7 @@ popFirst(): T
**示例:**
```
```
ts
let
deque
=
new
Deque
();
deque
.
insertFront
(
2
);
deque
.
insertFront
(
4
);
...
...
@@ -147,7 +147,7 @@ popLast(): T
**示例:**
```
```
ts
let
deque
=
new
Deque
();
deque
.
insertFront
(
2
);
deque
.
insertEnd
(
4
);
...
...
@@ -181,7 +181,7 @@ callbackfn的参数说明:
**示例:**
```
```
ts
let
deque
=
new
Deque
();
deque
.
insertFront
(
2
);
deque
.
insertEnd
(
4
);
...
...
@@ -206,7 +206,7 @@ getFirst(): T
**示例:**
```
```
ts
let
deque
=
new
Deque
();
deque
.
insertEnd
(
2
);
deque
.
insertEnd
(
4
);
...
...
@@ -229,7 +229,7 @@ getLast(): T
**示例:**
```
```
ts
let
deque
=
new
Deque
();
deque
.
insertFront
(
2
);
deque
.
insertFront
(
4
);
...
...
@@ -252,7 +252,7 @@ let result = deque.getLast();
| IterableIterator
<
T
>
| 返回一个迭代器。 |
**示例:**
```
```
ts
let
deque
=
new
Deque
();
deque
.
insertFront
(
2
);
deque
.
insertFront
(
4
);
...
...
zh-cn/application-dev/reference/apis/js-apis-hashmap.md
浏览文件 @
8a2bbe63
...
...
@@ -6,7 +6,7 @@
## 导入模块
```
```
ts
import
HashMap
from
'
@ohos.util.HashMap
'
```
...
...
@@ -32,7 +32,7 @@ HashMap的构造函数。
**示例:**
```
```
ts
let
hashMap
=
new
HashMap
();
```
...
...
@@ -51,7 +51,7 @@ isEmpty(): boolean
**示例:**
```
```
ts
const
hashMap
=
new
HashMap
();
let
result
=
hashMap
.
isEmpty
();
```
...
...
@@ -77,7 +77,7 @@ hasKey(key: K): boolean
**示例:**
```
```
ts
let
hashMap
=
new
HashMap
();
let
result
=
hashMap
.
hasKey
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
);
hashMap
.
set
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
,
123
);
...
...
@@ -105,7 +105,7 @@ hasValue(value: V): boolean
**示例:**
```
```
ts
let
hashMap
=
new
HashMap
();
let
result
=
hashMap
.
hasValue
(
123
);
hashMap
.
set
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
,
123
);
...
...
@@ -133,7 +133,7 @@ get(key: K): V
**示例:**
```
```
ts
let
hashMap
=
new
HashMap
();
hashMap
.
set
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
,
123
);
hashMap
.
set
(
"
sdfs
"
,
356
);
...
...
@@ -155,7 +155,7 @@ setAll(map: HashMap<K, V>): void
**示例:**
```
```
ts
let
hashMap
=
new
HashMap
();
hashMap
.
set
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
,
123
);
hashMap
.
set
(
"
sdfs
"
,
356
);
...
...
@@ -185,7 +185,7 @@ set(key: K, value: V): Object
**示例:**
```
```
ts
let
hashMap
=
new
HashMap
();
let
result
=
hashMap
.
set
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
,
123
);
```
...
...
@@ -211,7 +211,7 @@ remove(key: K): V
**示例:**
```
```
ts
let
hashMap
=
new
HashMap
();
hashMap
.
set
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
,
123
);
hashMap
.
set
(
"
sdfs
"
,
356
);
...
...
@@ -227,7 +227,7 @@ clear(): void
**示例:**
```
```
ts
let
hashMap
=
new
HashMap
();
hashMap
.
set
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
,
123
);
hashMap
.
set
(
"
sdfs
"
,
356
);
...
...
@@ -249,7 +249,7 @@ keys(): IterableIterator<K>
**示例:**
```
```
ts
let
hashMap
=
new
HashMap
();
hashMap
.
set
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
,
123
);
hashMap
.
set
(
"
sdfs
"
,
356
);
...
...
@@ -276,7 +276,7 @@ values(): IterableIterator<V>
**示例:**
```
```
ts
let
hashMap
=
new
HashMap
();
hashMap
.
set
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
,
123
);
hashMap
.
set
(
"
sdfs
"
,
356
);
...
...
@@ -310,7 +310,7 @@ replace(key: K, newValue: V): boolean
**示例:**
```
```
ts
let
hashMap
=
new
HashMap
();
hashMap
.
set
(
"
sdfs
"
,
123
);
let
result
=
hashMap
.
replace
(
"
sdfs
"
,
357
);
...
...
@@ -339,7 +339,7 @@ callbackfn的参数说明:
**示例:**
```
```
ts
let
hashMap
=
new
HashMap
();
hashMap
.
set
(
"
sdfs
"
,
123
);
hashMap
.
set
(
"
dfsghsf
"
,
357
);
...
...
@@ -363,7 +363,7 @@ entries(): IterableIterator<[K, V]>
**示例:**
```
```
ts
let
hashMap
=
new
HashMap
();
hashMap
.
set
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
,
123
);
hashMap
.
set
(
"
sdfs
"
,
356
);
...
...
@@ -390,7 +390,7 @@ while(temp != undefined) {
| IterableIterator
<
[K, V]
>
| 返回一个迭代器。 |
**示例:**
```
```
ts
let
hashMap
=
new
HashMap
();
hashMap
.
set
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
,
123
);
hashMap
.
set
(
"
sdfs
"
,
356
);
...
...
zh-cn/application-dev/reference/apis/js-apis-hashset.md
浏览文件 @
8a2bbe63
...
...
@@ -6,7 +6,7 @@
## 导入模块
```
```
ts
import
HashSet
from
'
@ohos.util.HashSet
'
;
```
...
...
@@ -32,7 +32,7 @@ HashSet的构造函数。
**示例:**
```
```
ts
let
hashSet
=
new
HashSet
();
```
...
...
@@ -51,9 +51,9 @@ isEmpty(): boolean
**示例:**
```
```
ts
const
hashSet
=
new
HashSet
();
hashSet.isEmpty();
let
result
=
hashSet
.
isEmpty
();
```
...
...
@@ -77,7 +77,7 @@ has(value: T): boolean
**示例:**
```
```
ts
let
hashSet
=
new
HashSet
();
let
result
=
hashSet
.
has
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
);
hashSet
.
add
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
);
...
...
@@ -105,7 +105,7 @@ add(value: T): boolean
**示例:**
```
```
ts
let
hashSet
=
new
HashSet
();
let
result
=
hashSet
.
add
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
);
```
...
...
@@ -131,7 +131,7 @@ remove(value: T): boolean
**示例:**
```
```
ts
let
hashSet
=
new
HashSet
();
hashSet
.
add
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
);
hashSet
.
add
(
"
sdfs
"
);
...
...
@@ -147,7 +147,7 @@ clear(): void
**示例:**
```
```
ts
let
hashSet
=
new
HashSet
();
hashSet
.
add
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
);
hashSet
.
add
(
"
sdfs
"
);
...
...
@@ -169,7 +169,7 @@ values(): IterableIterator<T>
**示例:**
```
```
ts
let
hashSet
=
new
HashSet
();
hashSet
.
add
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
);
hashSet
.
add
(
"
sdfs
"
);
...
...
@@ -204,7 +204,7 @@ callbackfn的参数说明:
**示例:**
```
```
ts
let
hashSet
=
new
HashSet
();
hashSet
.
add
(
"
sdfs
"
);
hashSet
.
add
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
);
...
...
@@ -227,7 +227,7 @@ entries(): IterableIterator<[T, T]>
**示例:**
```
```
ts
let
hashSet
=
new
HashSet
();
hashSet
.
add
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
);
hashSet
.
add
(
"
sdfs
"
);
...
...
@@ -255,7 +255,7 @@ while(temp != undefined) {
**示例:**
```
```
ts
let
hashSet
=
new
HashSet
();
hashSet
.
add
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
);
hashSet
.
add
(
"
sdfs
"
);
...
...
zh-cn/application-dev/reference/apis/js-apis-lightweightmap.md
浏览文件 @
8a2bbe63
...
...
@@ -6,7 +6,7 @@
## 导入模块
```
```
ts
import
LightWeightMap
from
'
@ohos.util.LightWeightMap
'
```
...
...
@@ -32,7 +32,7 @@ LightWeightMap的构造函数。
**示例:**
```
```
ts
let
lightWeightMap
=
new
LightWeightMap
();
```
...
...
@@ -51,7 +51,7 @@ isEmpty(): boolean
**示例:**
```
```
ts
const
lightWeightMap
=
new
LightWeightMap
();
let
result
=
lightWeightMap
.
isEmpty
();
```
...
...
@@ -77,7 +77,7 @@ hasAll(map: LightWeightMap<K, V>): boolean
**示例:**
```
```
ts
let
lightWeightMap
=
new
LightWeightMap
();
lightWeightMap
.
set
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
,
123
);
lightWeightMap
.
set
(
"
sdfs
"
,
356
);
...
...
@@ -107,7 +107,7 @@ hasKey(key: K): boolean;
**示例:**
```
```
ts
let
lightWeightMap
=
new
LightWeightMap
();
let
result
=
lightWeightMap
.
hasKey
;
lightWeightMap
.
hasKey
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
);
...
...
@@ -136,7 +136,7 @@ hasValue(value: V): boolean
**示例:**
```
```
ts
let
lightWeightMap
=
new
LightWeightMap
();
let
result
=
lightWeightMap
.
hasValue
(
123
);
lightWeightMap
.
set
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
,
123
);
...
...
@@ -158,7 +158,7 @@ increaseCapacityTo(minimumCapacity: number): void
**示例:**
```
```
ts
let
lightWeightMap
=
new
LightWeightMap
();
lightWeightMap
.
increaseCapacityTo
(
10
);
```
...
...
@@ -184,7 +184,7 @@ get(key: K): V
**示例:**
```
```
ts
let
lightWeightMap
=
new
LightWeightMap
();
lightWeightMap
.
set
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
,
123
);
lightWeightMap
.
set
(
"
sdfs
"
,
356
);
...
...
@@ -212,7 +212,7 @@ getIndexOfKey(key: K): number
**示例:**
```
```
ts
let
lightWeightMap
=
new
LightWeightMap
();
lightWeightMap
.
set
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
,
123
);
lightWeightMap
.
set
(
"
sdfs
"
,
356
);
...
...
@@ -240,7 +240,7 @@ getIndexOfValue(value: V): number
**示例:**
```
```
ts
let
lightWeightMap
=
new
LightWeightMap
();
lightWeightMap
.
set
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
,
123
);
lightWeightMap
.
set
(
"
sdfs
"
,
356
);
...
...
@@ -268,7 +268,7 @@ getKeyAt(index: number): K
**示例:**
```
```
ts
let
lightWeightMap
=
new
LightWeightMap
();
lightWeightMap
.
set
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
,
123
);
lightWeightMap
.
set
(
"
sdfs
"
,
356
);
...
...
@@ -290,7 +290,7 @@ setAll(map: LightWeightMap<K, V>): void
**示例:**
```
```
ts
let
lightWeightMap
=
new
LightWeightMap
();
lightWeightMap
.
set
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
,
123
);
lightWeightMap
.
set
(
"
sdfs
"
,
356
);
...
...
@@ -319,7 +319,7 @@ set(key: K, value: V): Object
**示例:**
```
```
ts
let
lightWeightMap
=
new
LightWeightMap
();
let
result
=
lightWeightMap
.
set
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
,
123
);
```
...
...
@@ -345,7 +345,7 @@ remove(key: K): V
**示例:**
```
```
ts
let
lightWeightMap
=
new
LightWeightMap
();
lightWeightMap
.
set
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
,
123
);
lightWeightMap
.
set
(
"
sdfs
"
,
356
);
...
...
@@ -373,7 +373,7 @@ removeAt(index: number): boolean
**示例:**
```
```
ts
let
lightWeightMap
=
new
LightWeightMap
();
lightWeightMap
.
set
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
,
123
);
lightWeightMap
.
set
(
"
sdfs
"
,
356
);
...
...
@@ -402,7 +402,7 @@ setValueAt(index: number, newValue: V): boolean
**示例:**
```
```
ts
let
lightWeightMap
=
new
LightWeightMap
();
lightWeightMap
.
set
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
,
123
);
lightWeightMap
.
set
(
"
sdfs
"
,
356
);
...
...
@@ -430,7 +430,7 @@ getValueAt(index: number): V
**示例:**
```
```
ts
let
lightWeightMap
=
new
LightWeightMap
();
lightWeightMap
.
set
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
,
123
);
lightWeightMap
.
set
(
"
sdfs
"
,
356
);
...
...
@@ -446,7 +446,7 @@ clear(): void
**示例:**
```
```
ts
let
lightWeightMap
=
new
LightWeightMap
();
lightWeightMap
.
set
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
,
123
);
lightWeightMap
.
set
(
"
sdfs
"
,
356
);
...
...
@@ -468,7 +468,7 @@ keys(): IterableIterator<K>
**示例:**
```
```
ts
let
lightWeightMap
=
new
LightWeightMap
();
lightWeightMap
.
set
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
,
123
);
lightWeightMap
.
set
(
"
sdfs
"
,
356
);
...
...
@@ -495,7 +495,7 @@ values(): IterableIterator<V>
**示例:**
```
```
ts
let
lightWeightMap
=
new
LightWeightMap
();
lightWeightMap
.
set
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
,
123
);
lightWeightMap
.
set
(
"
sdfs
"
,
356
);
...
...
@@ -530,7 +530,7 @@ callbackfn的参数说明:
**示例:**
```
```
ts
let
lightWeightMap
=
new
LightWeightMap
();
lightWeightMap
.
set
(
"
sdfs
"
,
123
);
lightWeightMap
.
set
(
"
dfsghsf
"
,
357
);
...
...
@@ -554,7 +554,7 @@ entries(): IterableIterator<[K, V]>
**示例:**
```
```
ts
let
lightWeightMap
=
new
LightWeightMap
();
lightWeightMap
.
set
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
,
123
);
lightWeightMap
.
set
(
"
sdfs
"
,
356
);
...
...
@@ -581,7 +581,7 @@ toString(): String
**示例:**
```
```
ts
let
lightWeightMap
=
new
LightWeightMap
();
lightWeightMap
.
set
(
"
A
"
,
123
);
lightWeightMap
.
set
(
"
sdfs
"
,
356
);
...
...
@@ -602,7 +602,7 @@ toString(): String
**示例:**
```
```
ts
let
lightWeightMap
=
new
LightWeightMap
();
lightWeightMap
.
set
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
,
123
);
lightWeightMap
.
set
(
"
sdfs
"
,
356
);
...
...
zh-cn/application-dev/reference/apis/js-apis-lightweightset.md
浏览文件 @
8a2bbe63
...
...
@@ -6,7 +6,7 @@
## 导入模块
```
```
ts
import
LightWeightSet
from
'
@ohos.util.LightWeightSet
'
```
...
...
@@ -32,7 +32,7 @@ LightWeightSet的构造函数。
**示例:**
```
```
ts
let
lightWeightSet
=
new
LightWeightSet
();
```
...
...
@@ -51,7 +51,7 @@ isEmpty(): boolean
**示例:**
```
```
ts
const
lightWeightSet
=
new
LightWeightSet
();
let
result
=
lightWeightSet
.
isEmpty
();
```
...
...
@@ -76,7 +76,7 @@ add(obj: T): boolean
**示例:**
```
```
ts
let
lightWeightSet
=
new
LightWeightSet
();
let
result
=
lightWeightSet
.
add
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
);
```
...
...
@@ -96,7 +96,7 @@ addAll(set: LightWeightSet<T>): boolean
**示例:**
```
```
ts
let
lightWeightSet
=
new
LightWeightSet
();
lightWeightSet
.
add
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
);
lightWeightSet
.
add
(
"
sdfs
"
);
...
...
@@ -126,7 +126,7 @@ hasAll(set: LightWeightSet<T>): boolean
**示例:**
```
```
ts
let
lightWeightSet
=
new
LightWeightSet
();
lightWeightSet
.
add
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
);
lightWeightSet
.
add
(
"
sdfs
"
);
...
...
@@ -156,7 +156,7 @@ has(key: T): boolean
**示例:**
```
```
ts
let
lightWeightSet
=
new
LightWeightSet
();
let
result
=
lightWeightSet
.
has
(
123
);
lightWeightSet
.
add
(
123
);
...
...
@@ -184,7 +184,7 @@ equal(obj: Object): boolean
**示例:**
```
```
ts
let
lightWeightSet
=
new
LightWeightSet
();
lightWeightSet
.
add
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
);
lightWeightSet
.
add
(
"
sdfs
"
);
...
...
@@ -207,7 +207,7 @@ increaseCapacityTo(minimumCapacity: number): void
**示例:**
```
```
ts
let
lightWeightSet
=
new
LightWeightSet
();
lightWeightSet
.
increaseCapacityTo
(
10
);
```
...
...
@@ -233,7 +233,7 @@ getIndexOf(key: T): number
**示例:**
```
```
ts
let
lightWeightSet
=
new
LightWeightSet
();
lightWeightSet
.
add
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
);
lightWeightSet
.
add
(
"
sdfs
"
);
...
...
@@ -261,7 +261,7 @@ remove(key: T): T
**示例:**
```
```
ts
let
lightWeightSet
=
new
LightWeightSet
();
lightWeightSet
.
add
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
);
lightWeightSet
.
add
(
"
sdfs
"
);
...
...
@@ -289,7 +289,7 @@ removeAt(index: number): boolean
**示例:**
```
```
ts
let
lightWeightSet
=
new
LightWeightSet
();
lightWeightSet
.
add
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
);
lightWeightSet
.
add
(
"
sdfs
"
);
...
...
@@ -317,7 +317,7 @@ getValueAt(index: number): T
**参数:**
```
```
ts
let
lightWeightSet
=
new
LightWeightSet
();
lightWeightSet
.
add
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
);
lightWeightSet
.
add
(
"
sdfs
"
);
...
...
@@ -333,7 +333,7 @@ clear(): void
**示例:**
```
```
ts
let
lightWeightSet
=
new
LightWeightSet
();
lightWeightSet
.
add
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
);
lightWeightSet
.
add
(
"
sdfs
"
);
...
...
@@ -355,7 +355,7 @@ toString(): String
**示例:**
```
```
ts
let
lightWeightSet
=
new
LightWeightSet
();
lightWeightSet
.
add
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
);
lightWeightSet
.
add
(
"
sdfs
"
);
...
...
@@ -377,7 +377,7 @@ toArray(): Array<T>
**示例:**
```
```
ts
let
lightWeightSet
=
new
LightWeightSet
();
lightWeightSet
.
add
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
);
lightWeightSet
.
add
(
"
sdfs
"
);
...
...
@@ -399,7 +399,7 @@ values(): IterableIterator<T>
**示例:**
```
```
ts
let
lightWeightSet
=
new
LightWeightSet
();
lightWeightSet
.
add
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
);
lightWeightSet
.
add
(
"
sdfs
"
);
...
...
@@ -434,7 +434,7 @@ callbackfn的参数说明:
**示例:**
```
```
ts
let
lightWeightSet
=
new
LightWeightSet
();
lightWeightSet
.
add
(
"
sdfs
"
);
lightWeightSet
.
add
(
"
dfsghsf
"
);
...
...
@@ -458,7 +458,7 @@ entries(): IterableIterator<[T, T]>
**示例:**
```
```
ts
let
lightWeightSet
=
new
LightWeightSet
();
lightWeightSet
.
add
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
);
lightWeightSet
.
add
(
"
sdfs
"
);
...
...
@@ -485,7 +485,7 @@ while(index < lightWeightSet.length) {
**示例:**
```
```
ts
let
lightWeightSet
=
new
LightWeightSet
();
lightWeightSet
.
add
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
);
lightWeightSet
.
add
(
"
sdfs
"
);
...
...
zh-cn/application-dev/reference/apis/js-apis-linkedlist.md
浏览文件 @
8a2bbe63
...
...
@@ -6,7 +6,7 @@
## 导入模块
```
```
ts
import
LinkedList
from
'
@ohos.util.LinkedList
'
```
...
...
@@ -34,7 +34,7 @@ LinkedList的构造函数。
**示例:**
```
```
ts
let
linkedList
=
new
LinkedList
();
```
...
...
@@ -59,7 +59,7 @@ add(element: T): boolean
**示例:**
```
```
ts
let
linkedList
=
new
LinkedList
();
let
result
=
linkedList
.
add
(
"
a
"
);
let
result1
=
linkedList
.
add
(
1
);
...
...
@@ -83,7 +83,7 @@ addFirst(element: T): void
**示例:**
```
```
ts
let
linkedList
=
new
LinkedList
();
linkedList
.
addFirst
(
"
a
"
);
linkedList
.
addFirst
(
1
);
...
...
@@ -108,7 +108,7 @@ insert(index: number, element: T): void
**示例:**
```
```
ts
let
linkedList
=
new
LinkedList
();
linkedList
.
insert
(
0
,
"
A
"
);
linkedList
.
insert
(
1
,
0
);
...
...
@@ -135,7 +135,7 @@ has(element: T): boolean
**示例:**
```
```
ts
let
linkedList
=
new
LinkedList
();
let
result1
=
linkedList
.
has
(
"
Ahfbrgrbgnutfodgorrogorg
"
);
linkedList
.
add
(
"
Ahfbrgrbgnutfodgorrogorg
"
);
...
...
@@ -162,7 +162,7 @@ get(index: number): T
**示例:**
```
```
ts
let
linkedList
=
new
LinkedList
();
linkedList
.
add
(
2
);
linkedList
.
add
(
4
);
...
...
@@ -194,7 +194,7 @@ getLastIndexOf(element: T): number
**示例:**
```
```
ts
let
linkedList
=
new
LinkedList
();
linkedList
.
add
(
2
);
linkedList
.
add
(
4
);
...
...
@@ -226,7 +226,7 @@ getIndexOf(element: T): number
**示例:**
```
```
ts
let
linkedList
=
new
LinkedList
();
linkedList
.
add
(
2
);
linkedList
.
add
(
4
);
...
...
@@ -258,7 +258,7 @@ removeByIndex(index: number): T
**示例:**
```
```
ts
let
linkedList
=
new
LinkedList
();
linkedList
.
add
(
2
);
linkedList
.
add
(
4
);
...
...
@@ -282,7 +282,7 @@ removeFirst(): T
**示例:**
```
```
ts
let
linkedList
=
new
LinkedList
();
linkedList
.
add
(
2
);
linkedList
.
add
(
4
);
...
...
@@ -306,7 +306,7 @@ removeLast(): T
**示例:**
```
```
ts
let
linkedList
=
new
LinkedList
();
linkedList
.
add
(
2
);
linkedList
.
add
(
4
);
...
...
@@ -336,7 +336,7 @@ remove(element: T): boolean
**示例:**
```
```
ts
let
linkedList
=
new
LinkedList
();
linkedList
.
add
(
2
);
linkedList
.
add
(
4
);
...
...
@@ -365,7 +365,7 @@ removeFirstFound(element: T): boolean
**示例:**
```
```
ts
let
linkedList
=
new
LinkedList
();
linkedList
.
add
(
2
);
linkedList
.
add
(
4
);
...
...
@@ -394,7 +394,7 @@ removeLastFound(element: T): boolean
**示例:**
```
```
ts
let
linkedList
=
new
LinkedList
();
linkedList
.
add
(
2
);
linkedList
.
add
(
4
);
...
...
@@ -417,7 +417,7 @@ clone(): LinkedList<T>
**示例:**
```
```
ts
let
linkedList
=
new
LinkedList
();
linkedList
.
add
(
2
);
linkedList
.
add
(
4
);
...
...
@@ -450,7 +450,7 @@ callbackfn的参数说明:
**示例:**
```
```
ts
let
linkedList
=
new
LinkedList
();
linkedList
.
add
(
2
);
linkedList
.
add
(
4
);
...
...
@@ -469,7 +469,7 @@ clear(): void
**示例:**
```
```
ts
let
linkedList
=
new
LinkedList
();
linkedList
.
add
(
2
);
linkedList
.
add
(
4
);
...
...
@@ -499,7 +499,7 @@ set(index: number, element: T): T
**示例:**
```
```
ts
let
linkedList
=
new
LinkedList
();
linkedList
.
add
(
2
);
linkedList
.
add
(
4
);
...
...
@@ -521,7 +521,7 @@ convertToArray(): Array<T>
| Array
<
T
>
| 返回转换后的数组。 |
**示例:**
```
```
ts
let
linkedList
=
new
LinkedList
();
linkedList
.
add
(
2
);
linkedList
.
add
(
4
);
...
...
@@ -544,7 +544,7 @@ getFirst(): T
**示例:**
```
```
ts
let
linkedList
=
new
LinkedList
();
linkedList
.
add
(
2
);
linkedList
.
add
(
4
);
...
...
@@ -567,7 +567,7 @@ getLast(): T
**示例:**
```
```
ts
let
linkedList
=
new
LinkedList
();
linkedList
.
add
(
2
);
linkedList
.
add
(
4
);
...
...
@@ -591,7 +591,7 @@ linkedList.getLast();
**示例:**
```
```
ts
let
linkedList
=
new
LinkedList
();
linkedList
.
add
(
2
);
linkedList
.
add
(
4
);
...
...
zh-cn/application-dev/reference/apis/js-apis-list.md
浏览文件 @
8a2bbe63
...
...
@@ -6,7 +6,7 @@
## 导入模块
```
```
ts
import
List
from
'
@ohos.util.List
'
```
...
...
@@ -34,7 +34,7 @@ List的构造函数。
**示例:**
```
```
ts
let
list
=
new
List
();
```
...
...
@@ -59,7 +59,7 @@ add(element: T): boolean
**示例:**
```
```
ts
let
list
=
new
List
();
let
result
=
list
.
add
(
"
a
"
);
let
result1
=
list
.
add
(
1
);
...
...
@@ -84,7 +84,7 @@ insert(element: T, index: number): void
**示例:**
```
```
ts
let
list
=
new
List
();
list
.
insert
(
"
A
"
,
0
);
list
.
insert
(
0
,
1
);
...
...
@@ -111,7 +111,7 @@ has(element: T): boolean
**示例:**
```
```
ts
let
list
=
new
List
();
let
result
=
list
.
has
(
"
Ahfbrgrbgnutfodgorrogorg
"
);
list
.
add
(
"
Ahfbrgrbgnutfodgorrogorg
"
);
...
...
@@ -138,7 +138,7 @@ get(index: number): T
**示例:**
```
```
ts
let
list
=
new
List
();
list
.
add
(
2
);
list
.
add
(
4
);
...
...
@@ -170,7 +170,7 @@ getLastIndexOf(element: T): number
**示例:**
```
```
ts
let
list
=
new
List
();
list
.
add
(
2
);
list
.
add
(
4
);
...
...
@@ -202,7 +202,7 @@ getIndexOf(element: T): number
**示例:**
```
```
ts
let
list
=
new
List
();
list
.
add
(
2
);
list
.
add
(
4
);
...
...
@@ -235,7 +235,7 @@ equal(obj: Object): boolean
**示例:**
```
```
ts
let
list
=
new
List
();
list
.
add
(
2
);
list
.
add
(
4
);
...
...
@@ -270,7 +270,7 @@ removeByIndex(index: number): T
**示例:**
```
```
ts
let
list
=
new
List
();
list
.
add
(
2
);
list
.
add
(
4
);
...
...
@@ -300,7 +300,7 @@ remove(element: T): boolean
**示例:**
```
```
ts
let
list
=
new
List
();
list
.
add
(
2
);
list
.
add
(
4
);
...
...
@@ -333,7 +333,7 @@ callbackfn的参数说明:
**示例:**
```
```
ts
let
list
=
new
List
();
list
.
add
(
2
);
list
.
add
(
4
);
...
...
@@ -371,7 +371,7 @@ callbackfn的参数说明:
**示例:**
```
```
ts
let
list
=
new
List
();
list
.
add
(
2
);
list
.
add
(
4
);
...
...
@@ -404,7 +404,7 @@ comparator的参数说明:
**示例:**
```
```
ts
let
list
=
new
List
();
list
.
add
(
2
);
list
.
add
(
4
);
...
...
@@ -435,7 +435,7 @@ getSubList(fromIndex: number, toIndex: number): List<T>
**示例:**
```
```
ts
let
list
=
new
List
();
list
.
add
(
2
);
list
.
add
(
4
);
...
...
@@ -454,7 +454,7 @@ clear(): void
**示例:**
```
```
ts
let
list
=
new
List
();
list
.
add
(
2
);
list
.
add
(
4
);
...
...
@@ -484,7 +484,7 @@ set(index: number, element: T): T
**示例:**
```
```
ts
let
list
=
new
List
();
list
.
add
(
2
);
list
.
add
(
4
);
...
...
@@ -508,7 +508,7 @@ convertToArray(): Array<T>
**示例:**
```
```
ts
let
list
=
new
List
();
list
.
add
(
2
);
list
.
add
(
4
);
...
...
@@ -531,7 +531,7 @@ isEmpty(): boolean
**示例:**
```
```
ts
let
list
=
new
List
();
list
.
add
(
2
);
list
.
add
(
4
);
...
...
@@ -554,7 +554,7 @@ getFirst(): T
**示例:**
```
```
ts
let
list
=
new
List
();
list
.
add
(
2
);
list
.
add
(
4
);
...
...
@@ -577,7 +577,7 @@ getLast(): T
**示例:**
```
```
ts
let
list
=
new
List
();
list
.
add
(
2
);
list
.
add
(
4
);
...
...
@@ -601,7 +601,7 @@ let result = list.getLast();
**示例:**
```
```
ts
let
list
=
new
List
();
list
.
add
(
2
);
list
.
add
(
4
);
...
...
zh-cn/application-dev/reference/apis/js-apis-plainarray.md
浏览文件 @
8a2bbe63
...
...
@@ -6,7 +6,7 @@
## 导入模块
```
```
ts
import
PlainArray
from
'
@ohos.util.PlainArray
'
```
...
...
@@ -32,7 +32,7 @@ PlainArray的构造函数。
**示例:**
```
```
ts
let
plainArray
=
new
PlainArray
();
```
...
...
@@ -51,7 +51,7 @@ isEmpty(): boolean
**示例:**
```
```
ts
const
plainArray
=
new
PlainArray
();
let
result
=
plainArray
.
isEmpty
();
```
...
...
@@ -77,7 +77,7 @@ has(key: number): boolean
**示例:**
```
```
ts
let
plainArray
=
new
PlainArray
();
plainArray
.
has
(
1
);
plainArray
.
add
(
1
,
"
sddfhf
"
);
...
...
@@ -105,7 +105,7 @@ get(key: number): T
**示例:**
```
```
ts
let
plainArray
=
new
PlainArray
();
plainArray
.
add
(
1
,
"
sddfhf
"
);
plainArray
.
add
(
2
,
"
sffdfhf
"
);
...
...
@@ -133,7 +133,7 @@ getIndexOfKey(key: number): number
**示例:**
```
```
ts
let
plainArray
=
new
PlainArray
();
plainArray
.
add
(
1
,
"
sddfhf
"
);
plainArray
.
add
(
2
,
"
sffdfhf
"
);
...
...
@@ -161,7 +161,7 @@ getIndexOfValue(value: T): number
**示例:**
```
```
ts
let
plainArray
=
new
PlainArray
();
plainArray
.
add
(
1
,
"
sddfhf
"
);
plainArray
.
add
(
2
,
"
sffdfhf
"
);
...
...
@@ -189,7 +189,7 @@ getKeyAt(index: number): number
**示例:**
```
```
ts
let
plainArray
=
new
PlainArray
();
plainArray
.
add
(
1
,
"
sddfhf
"
);
plainArray
.
add
(
2
,
"
sffdfhf
"
);
...
...
@@ -216,7 +216,7 @@ getValueAt(index: number): T
**示例:**
```
```
ts
let
plainArray
=
new
PlainArray
();
plainArray
.
add
(
1
,
"
sddfhf
"
);
plainArray
.
add
(
2
,
"
sffdfhf
"
);
...
...
@@ -237,7 +237,7 @@ clone(): PlainArray<T>
**示例:**
```
```
ts
let
plainArray
=
new
PlainArray
();
plainArray
.
add
(
1
,
"
sddfhf
"
);
plainArray
.
add
(
2
,
"
sffdfhf
"
);
...
...
@@ -260,7 +260,7 @@ add(key: number, value: T): void
**示例:**
```
```
ts
let
plainArray
=
new
PlainArray
();
plainArray
.
add
(
1
,
"
sddfhf
"
);
```
...
...
@@ -286,7 +286,7 @@ remove(key: number): T
**示例:**
```
```
ts
let
plainArray
=
new
PlainArray
();
plainArray
.
add
(
1
,
"
sddfhf
"
);
plainArray
.
add
(
2
,
"
sffdfhf
"
);
...
...
@@ -315,7 +315,7 @@ removeAt(index: number): T
**示例:**
```
```
ts
let
plainArray
=
new
PlainArray
();
plainArray
.
add
(
1
,
"
sddfhf
"
);
plainArray
.
add
(
2
,
"
sffdfhf
"
);
...
...
@@ -345,7 +345,7 @@ removeRangeFrom(index: number, size: number): number
**示例:**
```
```
ts
let
plainArray
=
new
PlainArray
();
plainArray
.
add
(
1
,
"
sddfhf
"
);
plainArray
.
add
(
2
,
"
sffdfhf
"
);
...
...
@@ -368,7 +368,7 @@ setValueAt(index: number, value: T): void
**示例:**
```
```
ts
let
plainArray
=
new
PlainArray
();
plainArray
.
add
(
1
,
"
sddfhf
"
);
plainArray
.
add
(
2
,
"
sffdfhf
"
);
...
...
@@ -390,7 +390,7 @@ toString(): String
**示例:**
```
```
ts
let
plainArray
=
new
PlainArray
();
plainArray
.
add
(
1
,
"
sddfhf
"
);
plainArray
.
add
(
2
,
"
sffdfhf
"
);
...
...
@@ -406,7 +406,7 @@ clear(): void
**示例:**
```
```
ts
let
plainArray
=
new
PlainArray
();
plainArray
.
add
(
1
,
"
sddfhf
"
);
plainArray
.
add
(
2
,
"
sffdfhf
"
);
...
...
@@ -436,7 +436,7 @@ callbackfn的参数说明:
**示例:**
```
```
ts
let
plainArray
=
new
PlainArray
();
plainArray
.
add
(
1
,
"
sddfhf
"
);
plainArray
.
add
(
2
,
"
sffdfhf
"
);
...
...
@@ -460,7 +460,7 @@ plainArray.forEach((value, key) => {
**示例:**
```
```
ts
let
plainArray
=
new
PlainArray
();
plainArray
.
add
(
1
,
"
sddfhf
"
);
plainArray
.
add
(
2
,
"
sffdfhf
"
);
...
...
zh-cn/application-dev/reference/apis/js-apis-queue.md
浏览文件 @
8a2bbe63
...
...
@@ -6,7 +6,7 @@
## 导入模块
```
```
ts
import
Queue
from
'
@ohos.util.Queue
'
```
...
...
@@ -33,7 +33,7 @@ Queue的构造函数。
**示例:**
```
```
ts
let
queue
=
new
Queue
();
```
...
...
@@ -58,7 +58,7 @@ add(element: T): boolean
**示例:**
```
```
ts
let
queue
=
new
Queue
();
let
result
=
queue
.
add
(
"
a
"
);
let
result1
=
queue
.
add
(
1
);
...
...
@@ -83,7 +83,7 @@ pop(): T
**示例:**
```
```
ts
let
queue
=
new
Queue
();
queue
.
add
(
2
);
queue
.
add
(
4
);
...
...
@@ -107,7 +107,7 @@ getFirst(): T
**示例:**
```
```
ts
let
queue
=
new
Queue
();
queue
.
add
(
2
);
queue
.
add
(
4
);
...
...
@@ -140,7 +140,7 @@ callbackfn的参数说明:
**示例:**
```
```
ts
let
queue
=
new
Queue
();
queue
.
add
(
2
);
queue
.
add
(
4
);
...
...
@@ -166,7 +166,7 @@ queue.forEach((value, index) => {
| IterableIterator
<
T
>
| 返回一个迭代器。 |
**示例:**
```
```
ts
let
queue
=
new
Queue
();
queue
.
add
(
2
);
queue
.
add
(
4
);
...
...
zh-cn/application-dev/reference/apis/js-apis-stack.md
浏览文件 @
8a2bbe63
...
...
@@ -6,7 +6,7 @@
## 导入模块
```
```
ts
import
Stack
from
'
@ohos.util.Stack
'
```
...
...
@@ -33,7 +33,7 @@ Stack的构造函数。
**示例:**
```
```
ts
let
stack
=
new
Stack
();
```
...
...
@@ -58,7 +58,7 @@ push(item: T): T
**示例:**
```
```
ts
let
stack
=
new
Stack
();
let
result
=
stack
.
push
(
"
a
"
);
let
result1
=
stack
.
push
(
1
);
...
...
@@ -82,7 +82,7 @@ pop(): T
**示例:**
```
```
ts
let
stack
=
new
Stack
();
stack
.
push
(
2
);
stack
.
push
(
4
);
...
...
@@ -106,7 +106,7 @@ peek(): T
**示例:**
```
```
ts
let
stack
=
new
Stack
();
stack
.
push
(
2
);
stack
.
push
(
4
);
...
...
@@ -135,7 +135,7 @@ locate(element: T): number
**示例:**
```
```
ts
let
stack
=
new
Stack
();
stack
.
push
(
2
);
stack
.
push
(
4
);
...
...
@@ -168,7 +168,7 @@ callbackfn的参数说明:
**示例:**
```
```
ts
let
stack
=
new
Stack
();
stack
.
push
(
2
);
stack
.
push
(
4
);
...
...
@@ -193,7 +193,7 @@ isEmpty(): boolean
**示例:**
```
```
ts
let
stack
=
new
Stack
();
stack
.
push
(
2
);
stack
.
push
(
4
);
...
...
@@ -216,7 +216,7 @@ let result = stack.isEmpty();
| IterableIterator
<
T
>
| 返回一个迭代器。 |
**示例:**
```
```
ts
let
stack
=
new
Stack
();
stack
.
push
(
2
);
stack
.
push
(
4
);
...
...
zh-cn/application-dev/reference/apis/js-apis-treemap.md
浏览文件 @
8a2bbe63
...
...
@@ -6,7 +6,7 @@
## 导入模块
```
```
ts
import
TreeMap
from
'
@ohos.util.TreeMap
'
```
...
...
@@ -38,7 +38,7 @@ TreeMap的构造函数。
**示例:**
```
```
ts
let
treeMap
=
new
TreeMap
();
```
...
...
@@ -57,7 +57,7 @@ isEmpty(): boolean
**示例:**
```
```
ts
const
treeMap
=
new
TreeMap
();
let
result
=
treeMap
.
isEmpty
();
```
...
...
@@ -83,7 +83,7 @@ hasKey(key: K): boolean
**示例:**
```
```
ts
let
treeMap
=
new
TreeMap
();
let
result
=
treeMap
.
hasKey
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
);
treeMap
.
set
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
,
123
);
...
...
@@ -111,7 +111,7 @@ hasValue(value: V): boolean
**示例:**
```
```
ts
let
treeMap
=
new
TreeMap
();
let
result
=
treeMap
.
hasValue
(
123
);
treeMap
.
set
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
,
123
);
...
...
@@ -139,7 +139,7 @@ get(key: K): V
**示例:**
```
```
ts
let
treeMap
=
new
TreeMap
();
treeMap
.
set
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
,
123
);
treeMap
.
set
(
"
sdfs
"
,
356
);
...
...
@@ -161,7 +161,7 @@ getFirstKey(): K
**示例:**
```
```
ts
let
treeMap
=
new
TreeMap
();
treeMap
.
set
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
,
123
);
treeMap
.
set
(
"
sdfs
"
,
356
);
...
...
@@ -183,7 +183,7 @@ getLastKey(): K
**示例:**
```
```
ts
let
treeMap
=
new
TreeMap
();
treeMap
.
set
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
,
123
);
treeMap
.
set
(
"
sdfs
"
,
356
);
...
...
@@ -205,7 +205,7 @@ setAll(map: TreeMap<K, V>): void
**示例:**
```
```
ts
let
treeMap
=
new
TreeMap
();
treeMap
.
set
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
,
123
);
treeMap
.
set
(
"
sdfs
"
,
356
);
...
...
@@ -235,7 +235,7 @@ set(key: K, value: V): Object
**示例:**
```
```
ts
let
treeMap
=
new
TreeMap
();
treeMap
.
set
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
,
123
);
```
...
...
@@ -261,7 +261,7 @@ remove(key: K): V
**示例:**
```
```
ts
let
treeMap
=
new
TreeMap
();
treeMap
.
set
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
,
123
);
treeMap
.
set
(
"
sdfs
"
,
356
);
...
...
@@ -289,7 +289,7 @@ getLowerKey(key: K): K
**示例:**
```
```
ts
let
treeMap
=
new
TreeMap
();
treeMap
.
set
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
,
123
);
treeMap
.
set
(
"
sdfs
"
,
356
);
...
...
@@ -318,7 +318,7 @@ getHigherKey(key: K): K
**示例:**
```
```
ts
let
treeMap
=
new
TreeMap
();
treeMap
.
set
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
,
123
);
treeMap
.
set
(
"
sdfs
"
,
356
);
...
...
@@ -347,7 +347,7 @@ replace(key: K, newValue: V): boolean
**示例:**
```
```
ts
let
treeMap
=
new
TreeMap
();
treeMap
.
set
(
"
sdfs
"
,
123
);
let
result
=
treeMap
.
replace
(
"
sdfs
"
,
357
);
...
...
@@ -362,7 +362,7 @@ clear(): void
**示例:**
```
```
ts
let
treeMap
=
new
TreeMap
();
treeMap
.
set
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
,
123
);
treeMap
.
set
(
"
sdfs
"
,
356
);
...
...
@@ -384,7 +384,7 @@ keys(): IterableIterator<K>
**示例:**
```
```
ts
let
treeMap
=
new
TreeMap
();
treeMap
.
set
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
,
123
);
treeMap
.
set
(
"
sdfs
"
,
356
);
...
...
@@ -411,7 +411,7 @@ values(): IterableIterator<V>
**示例:**
```
```
ts
let
treeMap
=
new
TreeMap
();
treeMap
.
set
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
,
123
);
treeMap
.
set
(
"
sdfs
"
,
356
);
...
...
@@ -446,7 +446,7 @@ callbackfn的参数说明:
**示例:**
```
```
ts
let
treeMap
=
new
TreeMap
();
treeMap
.
set
(
"
sdfs
"
,
123
);
treeMap
.
set
(
"
dfsghsf
"
,
357
);
...
...
@@ -470,7 +470,7 @@ entries(): IterableIterator<[K, V]>
**示例:**
```
```
ts
let
treeMap
=
new
TreeMap
();
treeMap
.
set
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
,
123
);
treeMap
.
set
(
"
sdfs
"
,
356
);
...
...
@@ -498,7 +498,7 @@ while(temp != undefined) {
**示例:**
```
```
ts
let
treeMap
=
new
TreeMap
();
treeMap
.
set
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
,
123
);
treeMap
.
set
(
"
sdfs
"
,
356
);
...
...
zh-cn/application-dev/reference/apis/js-apis-treeset.md
浏览文件 @
8a2bbe63
...
...
@@ -6,7 +6,7 @@
## 导入模块
```
```
ts
import
TreeSet
from
'
@ohos.util.TreeSet
'
```
...
...
@@ -38,7 +38,7 @@ TreeSet的构造函数。
**示例:**
```
```
ts
let
treeSet
=
new
TreeSet
();
```
...
...
@@ -57,7 +57,7 @@ isEmpty(): boolean
**示例:**
```
```
ts
const
treeSet
=
new
TreeSet
();
let
result
=
treeSet
.
isEmpty
();
```
...
...
@@ -83,7 +83,7 @@ has(value: T): boolean
**示例:**
```
```
ts
let
treeSet
=
new
TreeSet
();
treeSet
.
has
(
123
);
treeSet
.
add
(
123
);
...
...
@@ -105,7 +105,7 @@ getFirstValue(): T
**示例:**
```
```
ts
let
treeSet
=
new
TreeSet
();
treeSet
.
add
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
);
treeSet
.
add
(
"
sdfs
"
);
...
...
@@ -127,7 +127,7 @@ getLastValue(): T
**示例:**
```
```
ts
let
treeSet
=
new
TreeSet
();
treeSet
.
add
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
);
treeSet
.
add
(
"
sdfs
"
);
...
...
@@ -155,7 +155,7 @@ add(value: T): boolean
**示例:**
```
```
ts
let
treeSet
=
new
TreeSet
();
let
result
=
treeSet
.
add
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
);
```
...
...
@@ -181,7 +181,7 @@ remove(value: T): boolean
**示例:**
```
```
ts
let
treeSet
=
new
TreeSet
();
treeSet
.
add
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
);
treeSet
.
add
(
"
sdfs
"
);
...
...
@@ -209,7 +209,7 @@ getLowerValue(key: T): T
**示例:**
```
```
ts
let
treeSet
=
new
TreeSet
();
treeSet
.
add
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
);
treeSet
.
add
(
"
sdfs
"
);
...
...
@@ -238,7 +238,7 @@ getHigherValue(key: T): T
**示例:**
```
```
ts
let
treeSet
=
new
TreeSet
();
treeSet
.
add
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
);
treeSet
.
add
(
"
sdfs
"
);
...
...
@@ -261,7 +261,7 @@ popFirst(): T
**返回值:**
```
```
ts
let
treeSet
=
new
TreeSet
();
treeSet
.
add
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
);
treeSet
.
add
(
"
sdfs
"
);
...
...
@@ -283,7 +283,7 @@ popLast(): T
**返回值:**
```
```
ts
let
treeSet
=
new
TreeSet
();
treeSet
.
add
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
);
treeSet
.
add
(
"
sdfs
"
);
...
...
@@ -299,7 +299,7 @@ clear(): void
**示例:**
```
```
ts
let
treeSet
=
new
TreeSet
();
treeSet
.
add
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
);
treeSet
.
add
(
"
sdfs
"
);
...
...
@@ -321,7 +321,7 @@ values(): IterableIterator<T>
**示例:**
```
```
ts
let
treeSet
=
new
TreeSet
();
treeSet
.
add
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
);
treeSet
.
add
(
"
sdfs
"
);
...
...
@@ -356,7 +356,7 @@ callbackfn的参数说明:
**示例:**
```
```
ts
let
treeSet
=
new
TreeSet
();
treeSet
.
add
(
"
sdfs
"
);
treeSet
.
add
(
"
dfsghsf
"
);
...
...
@@ -380,7 +380,7 @@ entries(): IterableIterator<[T, T]>
**示例:**
```
```
ts
let
treeSet
=
new
TreeSet
();
treeSet
.
add
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
);
treeSet
.
add
(
"
sdfs
"
);
...
...
@@ -409,7 +409,7 @@ while(temp != undefined) {
**示例:**
```
```
ts
let
treeSet
=
new
TreeSet
();
treeSet
.
add
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
);
treeSet
.
add
(
"
sdfs
"
);
...
...
zh-cn/application-dev/reference/apis/js-apis-vector.md
浏览文件 @
8a2bbe63
...
...
@@ -6,7 +6,7 @@
## 导入模块
```
```
ts
import
Vector
from
'
@ohos.util.Vector
'
```
...
...
@@ -33,7 +33,7 @@ Vector的构造函数。
**示例:**
```
```
ts
let
vector
=
new
Vector
();
```
...
...
@@ -58,7 +58,7 @@ add(element: T): boolean
**示例:**
```
```
ts
let
vector
=
new
Vector
();
let
result
=
vector
.
add
(
"
a
"
);
let
result1
=
vector
.
add
(
1
);
...
...
@@ -83,7 +83,7 @@ insert(element: T, index: number): void
**示例:**
```
```
ts
let
vector
=
new
Vector
();
vector
.
insert
(
"
A
"
,
0
);
vector
.
insert
(
0
,
1
);
...
...
@@ -110,7 +110,7 @@ has(element: T): boolean
**示例:**
```
```
ts
let
vector
=
new
Vector
();
let
result
=
vector
.
has
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
);
vector
.
add
(
"
Ahfbrgrbgnutfodgorrogorgrogofdfdf
"
);
...
...
@@ -137,7 +137,7 @@ getIndexOf(element: T): number
**示例:**
```
```
ts
let
vector
=
new
Vector
();
vector
.
add
(
2
);
vector
.
add
(
4
);
...
...
@@ -169,7 +169,7 @@ getLastIndexOf(element: T): number
**示例:**
```
```
ts
let
vector
=
new
Vector
();
vector
.
add
(
2
);
vector
.
add
(
4
);
...
...
@@ -201,7 +201,7 @@ removeByIndex(index: number): T
**示例:**
```
```
ts
let
vector
=
new
Vector
();
vector
.
add
(
2
);
vector
.
add
(
4
);
...
...
@@ -231,7 +231,7 @@ remove(element: T): boolean
**返回值:**
```
```
ts
let
vector
=
new
Vector
();
vector
.
add
(
2
);
vector
.
add
(
4
);
...
...
@@ -255,7 +255,7 @@ removeByRange(fromIndex: number, toIndex: number): void
**示例:**
```
```
ts
let
vector
=
new
Vector
();
vector
.
add
(
2
);
vector
.
add
(
4
);
...
...
@@ -290,7 +290,7 @@ callbackfn的参数说明:
**示例:**
```
```
ts
let
vector
=
new
Vector
();
vector
.
add
(
2
);
vector
.
add
(
4
);
...
...
@@ -328,7 +328,7 @@ callbackfn的参数说明:
**示例:**
```
```
ts
let
vector
=
new
Vector
();
vector
.
add
(
2
);
vector
.
add
(
4
);
...
...
@@ -361,7 +361,7 @@ comparator的参数说明:
**示例:**
```
```
ts
let
vector
=
new
Vector
();
vector
.
add
(
2
);
vector
.
add
(
4
);
...
...
@@ -393,7 +393,7 @@ subVector(fromIndex: number, toIndex: number): Vector<T>
**返回值:**
```
```
ts
let
vector
=
new
Vector
();
vector
.
add
(
2
);
vector
.
add
(
4
);
...
...
@@ -413,7 +413,7 @@ clear(): void
**返回值:**
```
```
ts
let
vector
=
new
Vector
();
vector
.
add
(
2
);
vector
.
add
(
4
);
...
...
@@ -436,7 +436,7 @@ clone(): Vector<T>
**示例:**
```
```
ts
let
vector
=
new
Vector
();
vector
.
add
(
2
);
vector
.
add
(
4
);
...
...
@@ -459,7 +459,7 @@ getCapacity(): number
**示例:**
```
```
ts
let
vector
=
new
Vector
();
vector
.
add
(
2
);
vector
.
add
(
4
);
...
...
@@ -482,7 +482,7 @@ convertToArray(): Array<T>
**示例:**
```
```
ts
let
vector
=
new
Vector
();
vector
.
add
(
2
);
vector
.
add
(
4
);
...
...
@@ -505,7 +505,7 @@ isEmpty(): boolean
**示例:**
```
```
ts
let
vector
=
new
Vector
();
vector
.
add
(
2
);
vector
.
add
(
4
);
...
...
@@ -528,7 +528,7 @@ increaseCapacityTo(newCapacity: number): void
**示例:**
```
```
ts
let
vector
=
new
Vector
();
vector
.
add
(
2
);
vector
.
add
(
4
);
...
...
@@ -546,7 +546,7 @@ trimToCurrentLength(): void
**示例:**
```
```
ts
let
vector
=
new
Vector
();
vector
.
add
(
2
);
vector
.
add
(
4
);
...
...
@@ -569,7 +569,7 @@ toString(): string
**示例:**
```
```
ts
let
vector
=
new
Vector
();
vector
.
add
(
2
);
vector
.
add
(
4
);
...
...
@@ -592,7 +592,7 @@ copyToArray(array: Array<T>): void
**示例:**
```
```
ts
let
vector
=
new
Vector
();
vector
.
add
(
2
);
vector
.
add
(
4
);
...
...
@@ -616,7 +616,7 @@ getFirstElement(): T
**示例:**
```
```
ts
let
vector
=
new
Vector
();
vector
.
add
(
2
);
vector
.
add
(
4
);
...
...
@@ -639,7 +639,7 @@ getLastElement(): T
**示例:**
```
```
ts
let
vector
=
new
Vector
();
vector
.
add
(
2
);
vector
.
add
(
4
);
...
...
@@ -669,7 +669,7 @@ getLastIndexFrom(element: T, index: number): number
**示例:**
```
```
ts
let
vector
=
new
Vector
();
vector
.
add
(
2
);
vector
.
add
(
4
);
...
...
@@ -700,7 +700,7 @@ getIndexFrom(element: T, index: number): number
**示例:**
```
```
ts
let
vector
=
new
Vector
();
vector
.
add
(
2
);
vector
.
add
(
4
);
...
...
@@ -724,7 +724,7 @@ setLength(newSize: number): void
**示例:**
```
```
ts
let
vector
=
new
Vector
();
vector
.
add
(
2
);
vector
.
add
(
4
);
...
...
@@ -754,7 +754,7 @@ get(index: number): T
**示例:**
```
```
ts
let
vector
=
new
Vector
();
vector
.
add
(
2
);
vector
.
add
(
4
);
...
...
@@ -783,7 +783,7 @@ set(index: number, element: T): T
**示例:**
```
```
ts
let
vector
=
new
Vector
();
vector
.
add
(
2
);
vector
.
add
(
4
);
...
...
@@ -806,7 +806,7 @@ set(index: number, element: T): T
**示例:**
```
```
ts
let
vector
=
new
Vector
();
vector
.
add
(
2
);
vector
.
add
(
4
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录