提交 cb0e6a20 编写于 作者: W wangyong1995626wywz

Modify partial container construction missing parentheses

Description
    1. The structure in the deque example is missing parentheses
    2. The construction in the example of the list section is missing parentheses
    3. Modify the problem of missing blank lines
    #I4Z89B:Modify partial container construction missing parentheses
Signed-off-by: Nwangyong1995626wywz <wangyong237@huawei.com>
上级 d71ea446
......@@ -49,7 +49,7 @@ insertFront(element: T): void
**示例:**
```
let deque = new Deque;
let deque = new Deque();
deque.insertFront("a");
deque.insertFront(1);
let b = [1, 2, 3];
......@@ -73,7 +73,7 @@ insertEnd(element: T): void
**示例:**
```
let deque = new Deque;
let deque = new Deque();
deque.insertEnd("a");
deque.insertEnd(1);
let b = [1, 2, 3];
......
......@@ -404,11 +404,10 @@ let result = linkedList.removeLastFound(4);
```
### clone
clone(): LinkedList&lt;T&gt;
克隆一个与LinkedList相同的实例,并返回克隆后的实例。
clone(): LinkedList&lt;T&gt;
修改克隆后的实例并不会影响原实例。
克隆一个与LinkedList相同的实例,并返回克隆后的实例。修改克隆后的实例并不会影响原实例。
**返回值:**
......@@ -428,6 +427,7 @@ let result = linkedList.clone();
```
### forEach
forEach(callbackfn: (value: T, index?: number, LinkedList?: LinkedList&lt;T&gt;) => void,
thisArg?: Object): void
......@@ -462,6 +462,7 @@ linkedList.forEach((value, index) => {
```
### clear
clear(): void
清除LinkedList中的所有元素,并把length置为0。
......@@ -478,6 +479,7 @@ linkedList.clear();
```
### set
set(index: number, element: T): T
将此LinkedList中指定位置的元素替换为指定元素。
......
......@@ -60,7 +60,7 @@ add(element: T): boolean
**示例:**
```
let list = new List;
let list = new List();
let result = list.add("a");
let result1 = list.add(1);
let b = [1, 2, 3];
......
......@@ -539,6 +539,7 @@ vector.increaseCapacityTo(8);
```
### trimToCurrentLength
trimToCurrentLength(): void
把容量限制为当前的length大小。
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册