未验证 提交 20200ac3 编写于 作者: O openharmony_ci 提交者: Gitee

!9975 拼写规范修改,无需翻译

Merge pull request !9975 from zengyawen/master
...@@ -117,7 +117,7 @@ This API can be used to obtain the unique ID of the audio stream, UID of the aud ...@@ -117,7 +117,7 @@ This API can be used to obtain the unique ID of the audio stream, UID of the aud
console.info('Address:' + i + ':' + AudioRendererChangeInfo.deviceDescriptors[j].address); console.info('Address:' + i + ':' + AudioRendererChangeInfo.deviceDescriptors[j].address);
console.info('SampleRates:' + i + ':' + AudioRendererChangeInfo.deviceDescriptors[j].sampleRates[0]); console.info('SampleRates:' + i + ':' + AudioRendererChangeInfo.deviceDescriptors[j].sampleRates[0]);
console.info('ChannelCounts' + i + ':' + AudioRendererChangeInfo.deviceDescriptors[j].channelCounts[0]); console.info('ChannelCounts' + i + ':' + AudioRendererChangeInfo.deviceDescriptors[j].channelCounts[0]);
console.info('ChannnelMask:' + i + ':' + AudioRendererChangeInfo.deviceDescriptors[j].channelMasks); console.info('ChannelMask:' + i + ':' + AudioRendererChangeInfo.deviceDescriptors[j].channelMasks);
} }
} }
} }
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
You can call the APIs provided by the **Camera** module to develop a distributed camera that provides the basic camera functions such as shooting and video recording. You can call the APIs provided by the **Camera** module to develop a distributed camera that provides the basic camera functions such as shooting and video recording.
## How to Develop ## How to Develop
Connect your calculator to a distributed device. Your calculator will call **getCameras()** to obtain the camera list and traverse the returned camera list to check **ConnctionType** of the **Camera** objects. If **ConnctionType** of a **Camera** object is **CAMERA_CONNECTION_REMOTE**, your calculator will use this object to create a **CameraInput** object. The subsequent call process is the same as that of the local camera development. For details about the local camera development, see [Camera Development](./camera.md). Connect your calculator to a distributed device. Your calculator will call **getCameras()** to obtain the camera list and traverse the returned camera list to check **ConnectionType** of the **Camera** objects. If **ConnectionType** of a **Camera** object is **CAMERA_CONNECTION_REMOTE**, your calculator will use this object to create a **CameraInput** object. The subsequent call process is the same as that of the local camera development. For details about the local camera development, see [Camera Development](./camera.md).
For details about the APIs, see [Camera Management](../reference/apis/js-apis-camera.md). For details about the APIs, see [Camera Management](../reference/apis/js-apis-camera.md).
......
...@@ -8,7 +8,7 @@ Double-ended queue (deque) is a sequence container implemented based on the queu ...@@ -8,7 +8,7 @@ Double-ended queue (deque) is a sequence container implemented based on the queu
**Queue** follows the principle of FIFO only and allows element removal at the front and insertion at the rear. **Queue** follows the principle of FIFO only and allows element removal at the front and insertion at the rear.
**Vector** supports insertion and deletion of elements in between, as well asat both the ends. When compared with **Vector**, **Deque** is more efficient in inserting and removing header elements, but less efficient in accessing elements. **Vector** supports insertion and deletion of elements in between, as well as at both the ends. When compared with **Vector**, **Deque** is more efficient in inserting and removing header elements, but less efficient in accessing elements.
**Recommended use case**: Use **Deque** when you need to frequently insert or remove elements at both the ends of a container. **Recommended use case**: Use **Deque** when you need to frequently insert or remove elements at both the ends of a container.
......
...@@ -1130,7 +1130,7 @@ async function example() { ...@@ -1130,7 +1130,7 @@ async function example() {
const fetchFileResult = await media.getFileAssets(getImageOp); const fetchFileResult = await media.getFileAssets(getImageOp);
const asset = await fetchFileResult.getFirstObject(); const asset = await fetchFileResult.getFirstObject();
asset.getThumbnail((err, pixelmap) => { asset.getThumbnail((err, pixelmap) => {
console.info('mediaLibraryTest : getThumbnail Successfull '+ pixelmap); console.info('mediaLibraryTest : getThumbnail successful '+ pixelmap);
}); });
} }
``` ```
...@@ -1168,7 +1168,7 @@ async function example() { ...@@ -1168,7 +1168,7 @@ async function example() {
const fetchFileResult = await media.getFileAssets(getImageOp); const fetchFileResult = await media.getFileAssets(getImageOp);
const asset = await fetchFileResult.getFirstObject(); const asset = await fetchFileResult.getFirstObject();
asset.getThumbnail(size, (err, pixelmap) => { asset.getThumbnail(size, (err, pixelmap) => {
console.info('mediaLibraryTest : getThumbnail Successfull '+ pixelmap); console.info('mediaLibraryTest : getThumbnail successful '+ pixelmap);
}); });
} }
``` ```
...@@ -1212,7 +1212,7 @@ async function example() { ...@@ -1212,7 +1212,7 @@ async function example() {
const asset = await fetchFileResult.getFirstObject(); const asset = await fetchFileResult.getFirstObject();
asset.getThumbnail(size) asset.getThumbnail(size)
.then((pixelmap) => { .then((pixelmap) => {
console.info('mediaLibraryTest : getThumbnail Successfull '+ pixelmap); console.info('mediaLibraryTest : getThumbnail successful '+ pixelmap);
}) })
.catch((err) => { .catch((err) => {
console.info('mediaLibraryTest : getThumbnail fail'+ err); console.info('mediaLibraryTest : getThumbnail fail'+ err);
...@@ -1502,7 +1502,7 @@ async function example() { ...@@ -1502,7 +1502,7 @@ async function example() {
asset.trash(true, istrashCallBack); asset.trash(true, istrashCallBack);
} else { } else {
console.info('mediaLibraryTest : ASSET_CALLBACK isTrash Unsuccessfull = ' + err); console.info('mediaLibraryTest : ASSET_CALLBACK isTrash Unsuccessful = ' + err);
console.info('mediaLibraryTest : ASSET_CALLBACK isTrash : FAIL'); console.info('mediaLibraryTest : ASSET_CALLBACK isTrash : FAIL');
} }
...@@ -1736,7 +1736,7 @@ Obtains the next file asset in the result set. This API uses an asynchronous cal ...@@ -1736,7 +1736,7 @@ Obtains the next file asset in the result set. This API uses an asynchronous cal
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| --------- | --------------------------------------------- | ---- | ----------------------------------------- | | --------- | --------------------------------------------- | ---- | ----------------------------------------- |
| callbacke | AsyncCallback<[FileAsset](#fileasset7)> | Yes | Callback used to return the next file asset.| | callback | AsyncCallback<[FileAsset](#fileasset7)> | Yes | Callback used to return the next file asset.|
**Example** **Example**
......
...@@ -3163,7 +3163,7 @@ This is a system API and cannot be called by third-party applications. ...@@ -3163,7 +3163,7 @@ This is a system API and cannot be called by third-party applications.
| FACE_AUTH_TIP_POOR_GAZE | 10 | The face is not facing the device. | | FACE_AUTH_TIP_POOR_GAZE | 10 | The face is not facing the device. |
| FACE_AUTH_TIP_NOT_DETECTED | 11 | No face is detected. | | FACE_AUTH_TIP_NOT_DETECTED | 11 | No face is detected. |
## ingerprintTips<sup>8+</sup> ## FingerprintTips<sup>8+</sup>
Enumerates the tip codes for fingerprint authentication. Enumerates the tip codes for fingerprint authentication.
......
...@@ -197,9 +197,9 @@ Obtains the value of the first key-value pair based on the specified key. ...@@ -197,9 +197,9 @@ Obtains the value of the first key-value pair based on the specified key.
**Example** **Example**
```js ```js
let paramsOject = new Url.URLSearchParams('name=Jonathan&age=18'); let paramsObject = new Url.URLSearchParams('name=Jonathan&age=18');
let name = paramsOject.get("name"); // is the string "Jonathan" let name = paramsObject.get("name"); // is the string "Jonathan"
let age = parseInt(paramsOject.get("age"), 10); // is the number 18 let age = parseInt(paramsObject.get("age"), 10); // is the number 18
``` ```
......
...@@ -1015,7 +1015,7 @@ Obtains the value of the specified key. ...@@ -1015,7 +1015,7 @@ Obtains the value of the specified key.
| Type| Description| | Type| Description|
| -------- | -------- | | -------- | -------- |
| V \| undefind | Returns the value of the key if a match is found in the buffer; returns **undefined** otherwise.| | V \| undefined | Returns the value of the key if a match is found in the buffer; returns **undefined** otherwise.|
**Example** **Example**
```js ```js
...@@ -1116,7 +1116,7 @@ Removes the specified key and its value from this buffer. ...@@ -1116,7 +1116,7 @@ Removes the specified key and its value from this buffer.
| Type| Description| | Type| Description|
| -------- | -------- | | -------- | -------- |
| V \| undefind | Returns an **Optional** object containing the removed key-value pair if the key exists in the buffer; returns an empty **Optional** object otherwise. If the key is null, an exception will be thrown.| | V \| undefined | Returns an **Optional** object containing the removed key-value pair if the key exists in the buffer; returns an empty **Optional** object otherwise. If the key is null, an exception will be thrown.|
**Example** **Example**
```js ```js
...@@ -1291,7 +1291,7 @@ class Temperature{ ...@@ -1291,7 +1291,7 @@ class Temperature{
// private readonly _temp: Temperature; // private readonly _temp: Temperature;
this._temp = value; this._temp = value;
} }
comapreTo(value){ compareTo(value){
return this._temp >= value.getTemp(); return this._temp >= value.getTemp();
} }
getTemp(){ getTemp(){
......
...@@ -24,7 +24,7 @@ build() { ...@@ -24,7 +24,7 @@ build() {
let a: number = 1 // invalid: variable declaration not allowed let a: number = 1 // invalid: variable declaration not allowed
Column() { Column() {
Text('Hello ${this.myName.toUpperCase()}') // ok. Text('Hello ${this.myName.toUpperCase()}') // ok.
ForEach(this.arr.reverse(), ..., ...) // invalid: Array.reverse modifies the @State array varible in place ForEach(this.arr.reverse(), ..., ...) // invalid: Array.reverse modifies the @State array variable in place
} }
buildSpecial() // invalid: no function calls buildSpecial() // invalid: no function calls
Text(this.calcTextValue()) // this function call is ok. Text(this.calcTextValue()) // this function call is ok.
......
...@@ -117,7 +117,7 @@ AudioStreamManager提供了音频流管理的方法。开发者可以通过本 ...@@ -117,7 +117,7 @@ AudioStreamManager提供了音频流管理的方法。开发者可以通过本
console.info('Address:' + i + ':' + AudioRendererChangeInfo.deviceDescriptors[j].address); console.info('Address:' + i + ':' + AudioRendererChangeInfo.deviceDescriptors[j].address);
console.info('SampleRates:' + i + ':' + AudioRendererChangeInfo.deviceDescriptors[j].sampleRates[0]); console.info('SampleRates:' + i + ':' + AudioRendererChangeInfo.deviceDescriptors[j].sampleRates[0]);
console.info('ChannelCounts' + i + ':' + AudioRendererChangeInfo.deviceDescriptors[j].channelCounts[0]); console.info('ChannelCounts' + i + ':' + AudioRendererChangeInfo.deviceDescriptors[j].channelCounts[0]);
console.info('ChannnelMask:' + i + ':' + AudioRendererChangeInfo.deviceDescriptors[j].channelMasks); console.info('ChannelMask:' + i + ':' + AudioRendererChangeInfo.deviceDescriptors[j].channelMasks);
} }
} }
} }
......
...@@ -285,7 +285,7 @@ public async init(surfaceId: any) { ...@@ -285,7 +285,7 @@ public async init(surfaceId: any) {
// 获取Surface ID // 获取Surface ID
var surfaceId = await receiver.getReceivingSurfaceId(); var surfaceId = await receiver.getReceivingSurfaceId();
// 注册Surface的监听,在suface的buffer准备好后触发 // 注册Surface的监听,在surface的buffer准备好后触发
receiver.on('imageArrival', () => { receiver.on('imageArrival', () => {
// 去获取Surface中最新的buffer // 去获取Surface中最新的buffer
receiver.readNextImage((err, img) => { receiver.readNextImage((err, img) => {
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
分布式相机模块支持相机相关基础功能介绍说明。 分布式相机模块支持相机相关基础功能介绍说明。
## 开发步骤 ## 开发步骤
在计算器中连接分布式设备,在获取相机列表时getCameras(),遍历返回的列表,判断对应Camera对象中的ConnctionType是否等于CAMERA_CONNECTION_REMOTE,若等于则使用此对象创建camerainput,之后调用与本地相机使用一样。参考:[相机开发指导](./camera.md) 在计算器中连接分布式设备,在获取相机列表时getCameras(),遍历返回的列表,判断对应Camera对象中的ConnectionType是否等于CAMERA_CONNECTION_REMOTE,若等于则使用此对象创建camerainput,之后调用与本地相机使用一样。参考:[相机开发指导](./camera.md)
详细API含义请参考:[相机管理API文档](../reference/apis/js-apis-camera.md) 详细API含义请参考:[相机管理API文档](../reference/apis/js-apis-camera.md)
......
...@@ -144,7 +144,7 @@ getPrivateDirty(): bigint ...@@ -144,7 +144,7 @@ getPrivateDirty(): bigint
getCpuUsage(): number getCpuUsage(): number
获取进程的cpu使用率。 获取进程的CPU使用率。
如占用率为50%,则返回0.5。 如占用率为50%,则返回0.5。
...@@ -154,7 +154,7 @@ getCpuUsage(): number ...@@ -154,7 +154,7 @@ getCpuUsage(): number
| 类型 | 说明 | | 类型 | 说明 |
| ------ | -------------------------- | | ------ | -------------------------- |
| number | 获取进程的cpu使用率。 | | number | 获取进程的CPU使用率。 |
**示例:** **示例:**
......
...@@ -1395,7 +1395,7 @@ async function example() { ...@@ -1395,7 +1395,7 @@ async function example() {
const fetchFileResult = await media.getFileAssets(getImageOp); const fetchFileResult = await media.getFileAssets(getImageOp);
const asset = await fetchFileResult.getFirstObject(); const asset = await fetchFileResult.getFirstObject();
asset.getThumbnail((err, pixelmap) => { asset.getThumbnail((err, pixelmap) => {
console.info('mediaLibraryTest : getThumbnail Successfull '+ pixelmap); console.info('mediaLibraryTest : getThumbnail Successful '+ pixelmap);
}); });
} }
``` ```
...@@ -1433,7 +1433,7 @@ async function example() { ...@@ -1433,7 +1433,7 @@ async function example() {
const fetchFileResult = await media.getFileAssets(getImageOp); const fetchFileResult = await media.getFileAssets(getImageOp);
const asset = await fetchFileResult.getFirstObject(); const asset = await fetchFileResult.getFirstObject();
asset.getThumbnail(size, (err, pixelmap) => { asset.getThumbnail(size, (err, pixelmap) => {
console.info('mediaLibraryTest : getThumbnail Successfull '+ pixelmap); console.info('mediaLibraryTest : getThumbnail Successful '+ pixelmap);
}); });
} }
``` ```
...@@ -1477,7 +1477,7 @@ async function example() { ...@@ -1477,7 +1477,7 @@ async function example() {
const asset = await fetchFileResult.getFirstObject(); const asset = await fetchFileResult.getFirstObject();
asset.getThumbnail(size) asset.getThumbnail(size)
.then((pixelmap) => { .then((pixelmap) => {
console.info('mediaLibraryTest : getThumbnail Successfull '+ pixelmap); console.info('mediaLibraryTest : getThumbnail Successful '+ pixelmap);
}) })
.catch((err) => { .catch((err) => {
console.info('mediaLibraryTest : getThumbnail fail'+ err); console.info('mediaLibraryTest : getThumbnail fail'+ err);
......
...@@ -66,7 +66,7 @@ connection.getDefaultNet().then(function (netHandle) { ...@@ -66,7 +66,7 @@ connection.getDefaultNet().then(function (netHandle) {
hasDefaultNet(callback: AsyncCallback\<boolean>): void hasDefaultNet(callback: AsyncCallback\<boolean>): void
检查默认数据网络是否被激活,使用callback方式作为异步方法。 检查默认数据网络是否被激活,使用callback方式作为异步方法。
默认数据网络:以太网>wifi>蜂窝,当只有一个网络为连接状态时,当前连接网络为默认数据网络。 默认数据网络:以太网>Wi-Fi>蜂窝,当只有一个网络为连接状态时,当前连接网络为默认数据网络。
**系统能力**:SystemCapability.Communication.NetManager.Core **系统能力**:SystemCapability.Communication.NetManager.Core
...@@ -90,7 +90,7 @@ connection.hasDefaultNet(function (error, has) { ...@@ -90,7 +90,7 @@ connection.hasDefaultNet(function (error, has) {
hasDefaultNet(): Promise\<boolean> hasDefaultNet(): Promise\<boolean>
检查默认数据网络是否被激活,使用Promise方式作为异步方法。 检查默认数据网络是否被激活,使用Promise方式作为异步方法。
默认数据网络:以太网>wifi>蜂窝,当只有一个网络为连接状态时,当前连接网络为默认数据网络。 默认数据网络:以太网>Wi-Fi>蜂窝,当只有一个网络为连接状态时,当前连接网络为默认数据网络。
**系统能力**:SystemCapability.Communication.NetManager.Core **系统能力**:SystemCapability.Communication.NetManager.Core
...@@ -1031,7 +1031,7 @@ connection.getDefaultNet().then(function (netHandle) { ...@@ -1031,7 +1031,7 @@ connection.getDefaultNet().then(function (netHandle) {
| 参数名 | 类型 | 说明 | | 参数名 | 类型 | 说明 |
| ----------------------- | ----------------------------------- | ------------------------------------------------------------ | | ----------------------- | ----------------------------------- | ------------------------------------------------------------ |
| netCapabilities | [NetCapabilities](#netcapabilities) | 存储数据网络的传输能力和承载类型。 | | netCapabilities | [NetCapabilities](#netcapabilities) | 存储数据网络的传输能力和承载类型。 |
| bearerPrivateIdentifier | string | 网络标识符,WIFI网络的标识符是"wifi",蜂窝网络的标识符是"slot0"(对应SIM卡1)。 | | bearerPrivateIdentifier | string | 网络标识符,Wi-Fi网络的标识符是"wifi",蜂窝网络的标识符是"slot0"(对应SIM卡1)。 |
## NetCapabilities ## NetCapabilities
......
...@@ -239,7 +239,7 @@ isOsAccountConstraintEnable(localId: number, constraint: string, callback: Async ...@@ -239,7 +239,7 @@ isOsAccountConstraintEnable(localId: number, constraint: string, callback: Async
| constraint | string | 是 | 指定的[约束](#系统帐号约束列表)名称。 | | constraint | string | 是 | 指定的[约束](#系统帐号约束列表)名称。 |
| callback | AsyncCallback&lt;boolean&gt; | 是 | 回调结果,具有指定约束则返回true,否则返回false。 | | callback | AsyncCallback&lt;boolean&gt; | 是 | 回调结果,具有指定约束则返回true,否则返回false。 |
**示例:**判断ID为100的系统帐号是否有禁止使用wifi的约束 **示例:**判断ID为100的系统帐号是否有禁止使用Wi-Fi的约束
```js ```js
let accountManager = account_osAccount.getAccountManager(); let accountManager = account_osAccount.getAccountManager();
...@@ -273,7 +273,7 @@ isOsAccountConstraintEnable(localId: number, constraint: string): Promise&lt;boo ...@@ -273,7 +273,7 @@ isOsAccountConstraintEnable(localId: number, constraint: string): Promise&lt;boo
| :--------------------- | :----------------------------------------------------------- | | :--------------------- | :----------------------------------------------------------- |
| Promise&lt;boolean&gt; | Promise实例,用于获取异步返回结果,具有指定约束则返回true,否则返回false。 | | Promise&lt;boolean&gt; | Promise实例,用于获取异步返回结果,具有指定约束则返回true,否则返回false。 |
**示例:**判断ID为100的系统帐号是否有禁止使用wifi的约束 **示例:**判断ID为100的系统帐号是否有禁止使用Wi-Fi的约束
```js ```js
let accountManager = account_osAccount.getAccountManager(); let accountManager = account_osAccount.getAccountManager();
...@@ -506,7 +506,7 @@ setOsAccountConstraints(localId: number, constraints: Array&lt;string&gt;, enabl ...@@ -506,7 +506,7 @@ setOsAccountConstraints(localId: number, constraints: Array&lt;string&gt;, enabl
| enable | boolean | 是 | 设置(true)/删除(false) | | enable | boolean | 是 | 设置(true)/删除(false) |
| callback | AsyncCallback&lt;void&gt; | 是 | 回调结果。 | | callback | AsyncCallback&lt;void&gt; | 是 | 回调结果。 |
**示例:**给ID为100的系统帐号设置禁止使用wifi的约束 **示例:**给ID为100的系统帐号设置禁止使用Wi-Fi的约束
```js ```js
let accountManager = account_osAccount.getAccountManager(); let accountManager = account_osAccount.getAccountManager();
...@@ -542,7 +542,7 @@ setOsAccountConstraints(localId: number, constraints: Array&lt;string&gt;, enabl ...@@ -542,7 +542,7 @@ setOsAccountConstraints(localId: number, constraints: Array&lt;string&gt;, enabl
| :------------------ | :---------------------------------- | | :------------------ | :---------------------------------- |
| Promise&lt;void&gt; | Promise实例,用于获取异步返回结果。 | | Promise&lt;void&gt; | Promise实例,用于获取异步返回结果。 |
**示例:**删除ID为100的系统帐号的禁止使用wifi的约束 **示例:**删除ID为100的系统帐号的禁止使用Wi-Fi的约束
```js ```js
let accountManager = account_osAccount.getAccountManager(); let accountManager = account_osAccount.getAccountManager();
...@@ -3164,7 +3164,7 @@ onAcquireInfo?: (module: number, acquire: number, extraInfo: any) => void; ...@@ -3164,7 +3164,7 @@ onAcquireInfo?: (module: number, acquire: number, extraInfo: any) => void;
| FACE_AUTH_TIP_POOR_GAZE | 10 | 表示面未朝向设备。 | | FACE_AUTH_TIP_POOR_GAZE | 10 | 表示面未朝向设备。 |
| FACE_AUTH_TIP_NOT_DETECTED | 11 | 表示未检测到人脸。 | | FACE_AUTH_TIP_NOT_DETECTED | 11 | 表示未检测到人脸。 |
## ingerprintTips<sup>8+</sup> ## FingerprintTips<sup>8+</sup>
枚举,指示指纹身份验证过程中提示代码。 枚举,指示指纹身份验证过程中提示代码。
...@@ -3218,8 +3218,8 @@ onAcquireInfo?: (module: number, acquire: number, extraInfo: any) => void; ...@@ -3218,8 +3218,8 @@ onAcquireInfo?: (module: number, acquire: number, extraInfo: any) => void;
| 约束 | 说明 | | 约束 | 说明 |
| ------------------------------------- | ------------------------------ | | ------------------------------------- | ------------------------------ |
| constraint.wifi | 禁止使用wifi | | constraint.wifi | 禁止使用Wi-Fi |
| constraint.wifi.set | 禁止配置wifi | | constraint.wifi.set | 禁止配置Wi-Fi |
| constraint.locale.set | 禁止配置设备语言 | | constraint.locale.set | 禁止配置设备语言 |
| constraint.app.accounts | 禁止添加和删除应用帐号 | | constraint.app.accounts | 禁止添加和删除应用帐号 |
| constraint.apps.install | 禁止安装应用 | | constraint.apps.install | 禁止安装应用 |
......
...@@ -196,9 +196,9 @@ get(name: string): string | null ...@@ -196,9 +196,9 @@ get(name: string): string | null
**示例:** **示例:**
```js ```js
let paramsOject = new Url.URLSearchParams('name=Jonathan&age=18'); let paramsObject = new Url.URLSearchParams('name=Jonathan&age=18');
let name = paramsOject.get("name"); // is the string "Jonathan" let name = paramsObject.get("name"); // is the string "Jonathan"
let age = parseInt(paramsOject.get("age"), 10); // is the number 18 let age = parseInt(paramsObject.get("age"), 10); // is the number 18
``` ```
......
...@@ -1014,7 +1014,7 @@ get(key: K): V | undefined ...@@ -1014,7 +1014,7 @@ get(key: K): V | undefined
| 类型 | 说明 | | 类型 | 说明 |
| -------- | -------- | | -------- | -------- |
| V&nbsp;\|&nbsp;undefind | 如果指定的键存在于缓冲区中,则返回与键关联的值;否则返回undefined。 | | V&nbsp;\|&nbsp;undefined | 如果指定的键存在于缓冲区中,则返回与键关联的值;否则返回undefined。 |
**示例:** **示例:**
```js ```js
...@@ -1115,7 +1115,7 @@ remove(key: K): V | undefined ...@@ -1115,7 +1115,7 @@ remove(key: K): V | undefined
| 类型 | 说明 | | 类型 | 说明 |
| -------- | -------- | | -------- | -------- |
| V&nbsp;\|&nbsp;undefind | 返回一个包含已删除键值对的Optional对象;如果key不存在,则返回一个空的Optional对象,如果key为null,则抛出异常。 | | V&nbsp;\|&nbsp;undefined | 返回一个包含已删除键值对的Optional对象;如果key不存在,则返回一个空的Optional对象,如果key为null,则抛出异常。 |
**示例:** **示例:**
```js ```js
...@@ -1290,7 +1290,7 @@ class Temperature{ ...@@ -1290,7 +1290,7 @@ class Temperature{
// private readonly _temp: Temperature; // private readonly _temp: Temperature;
this._temp = value; this._temp = value;
} }
comapreTo(value){ compareTo(value){
return this._temp >= value.getTemp(); return this._temp >= value.getTemp();
} }
getTemp(){ getTemp(){
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册