Obtains entries within a range in this container, including the entry at the start position but not that at the end position, and returns these entries as a new **List** instance.
...
...
@@ -443,6 +447,7 @@ let result2 = list.subList(2, 6);
```
### clear
clear(): void
Clears this container and sets its length to **0**.
...
...
@@ -459,6 +464,7 @@ list.clear();
```
### set
set(index: number, element: T): T
Replaces an entry at the specified position in this container with a given entry.
...
...
@@ -489,6 +495,7 @@ list.set(2, "b");
```
### convertToArray
convertToArray(): Array<T>
Converts this container into an array.
...
...
@@ -511,6 +518,7 @@ let result = list.convertToArray();
```
### isEmpty
isEmpty(): boolean
Checks whether this container is empty (contains no entry).
...
...
@@ -547,7 +555,7 @@ Obtains the first entry in this container.
**Example**
```
let list = new Vector();
let list = new List();
list.add(2);
list.add(4);
list.add(5);
...
...
@@ -570,7 +578,7 @@ Obtains the last entry in this container.
**Example**
```
let list = new Vector();
let list = new List();
list.add(2);
list.add(4);
list.add(5);
...
...
@@ -580,7 +588,7 @@ let result = list.getLast();
### [Symbol.iterator]
[Symbol.iterator]\(): IterableIterator<T>;
[Symbol.iterator]\(): IterableIterator<T>
Obtains an iterator, each item of which is a JavaScript object.