mirror of
https://gitee.com/openharmony/interface_sdk-js
synced 2024-11-23 23:30:15 +00:00
ArrayList增加取下标接口
Signed-off-by: 张鸿雨 <zhanghongyu42@huawei.com>
This commit is contained in:
parent
5580194b70
commit
cbf61b6cb3
13
api/@ohos.util.ArrayList.d.ts
vendored
13
api/@ohos.util.ArrayList.d.ts
vendored
@ -749,6 +749,19 @@ declare class ArrayList<T> {
|
|||||||
* @since 12
|
* @since 12
|
||||||
*/
|
*/
|
||||||
isEmpty(): boolean;
|
isEmpty(): boolean;
|
||||||
|
/**
|
||||||
|
* Returns the item at that index.
|
||||||
|
*
|
||||||
|
* @param { number } index - The zero-based index of the desired code unit.
|
||||||
|
* Throws error if index < 0 or index >= arraylist.length.
|
||||||
|
* @returns { T } The element in the arraylist matching the given index.
|
||||||
|
* @throws { BusinessError } 401 - Parameter error.
|
||||||
|
* @throws { BusinessError } 10200001 - The value of index is out of range.
|
||||||
|
* @syscap SystemCapability.Utils.Lang
|
||||||
|
* @atomicservice
|
||||||
|
* @since 12
|
||||||
|
*/
|
||||||
|
[index: number]: T;
|
||||||
/**
|
/**
|
||||||
* If the newCapacity provided by the user is greater than or equal to length,
|
* If the newCapacity provided by the user is greater than or equal to length,
|
||||||
* change the capacity of the arraylist to newCapacity, otherwise the capacity will not be changed
|
* change the capacity of the arraylist to newCapacity, otherwise the capacity will not be changed
|
||||||
|
Loading…
Reference in New Issue
Block a user