161847f8eSopenharmony_ci/*
261847f8eSopenharmony_ci * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
361847f8eSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
461847f8eSopenharmony_ci * you may not use this file except in compliance with the License.
561847f8eSopenharmony_ci * You may obtain a copy of the License at
661847f8eSopenharmony_ci *
761847f8eSopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
861847f8eSopenharmony_ci *
961847f8eSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
1061847f8eSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
1161847f8eSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1261847f8eSopenharmony_ci * See the License for the specific language governing permissions and
1361847f8eSopenharmony_ci * limitations under the License.
1461847f8eSopenharmony_ci */
1561847f8eSopenharmony_ci
1661847f8eSopenharmony_ci/**
1761847f8eSopenharmony_ci * @file
1861847f8eSopenharmony_ci * @kit ArkTS
1961847f8eSopenharmony_ci */
2061847f8eSopenharmony_ci
2161847f8eSopenharmony_ci/**
2261847f8eSopenharmony_ci * ArrayList is a linear data structure that is implemented based on arrays. 
2361847f8eSopenharmony_ci * ArrayList can dynamically adjust the capacity based on project requirements. It increases the capacity by 50% each time.
2461847f8eSopenharmony_ci *
2561847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang
2661847f8eSopenharmony_ci * @since 8
2761847f8eSopenharmony_ci */
2861847f8eSopenharmony_ci/**
2961847f8eSopenharmony_ci * ArrayList is a linear data structure that is implemented based on arrays. 
3061847f8eSopenharmony_ci * ArrayList can dynamically adjust the capacity based on project requirements. It increases the capacity by 50% each time.
3161847f8eSopenharmony_ci *
3261847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang
3361847f8eSopenharmony_ci * @crossplatform
3461847f8eSopenharmony_ci * @since 10
3561847f8eSopenharmony_ci */
3661847f8eSopenharmony_ci/**
3761847f8eSopenharmony_ci * ArrayList is a linear data structure that is implemented based on arrays. 
3861847f8eSopenharmony_ci * ArrayList can dynamically adjust the capacity based on project requirements. It increases the capacity by 50% each time.
3961847f8eSopenharmony_ci *
4061847f8eSopenharmony_ci * @syscap SystemCapability.Utils.Lang
4161847f8eSopenharmony_ci * @crossplatform
4261847f8eSopenharmony_ci * @atomicservice
4361847f8eSopenharmony_ci * @since 12
4461847f8eSopenharmony_ci */
4561847f8eSopenharmony_cideclare class ArrayList<T> {
4661847f8eSopenharmony_ci  /**
4761847f8eSopenharmony_ci   * A constructor used to create a ArrayList object.
4861847f8eSopenharmony_ci   *
4961847f8eSopenharmony_ci   * @throws { BusinessError } 10200012 - The ArrayList's constructor cannot be directly invoked.
5061847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
5161847f8eSopenharmony_ci   * @since 8
5261847f8eSopenharmony_ci   */
5361847f8eSopenharmony_ci  /**
5461847f8eSopenharmony_ci   * A constructor used to create a ArrayList object.
5561847f8eSopenharmony_ci   *
5661847f8eSopenharmony_ci   * @throws { BusinessError } 10200012 - The ArrayList's constructor cannot be directly invoked.
5761847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
5861847f8eSopenharmony_ci   * @crossplatform
5961847f8eSopenharmony_ci   * @since 10
6061847f8eSopenharmony_ci   */
6161847f8eSopenharmony_ci  /**
6261847f8eSopenharmony_ci   * A constructor used to create a ArrayList object.
6361847f8eSopenharmony_ci   *
6461847f8eSopenharmony_ci   * @throws { BusinessError } 10200012 - The ArrayList's constructor cannot be directly invoked.
6561847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
6661847f8eSopenharmony_ci   * @crossplatform
6761847f8eSopenharmony_ci   * @atomicservice
6861847f8eSopenharmony_ci   * @since 12
6961847f8eSopenharmony_ci   */
7061847f8eSopenharmony_ci  constructor();
7161847f8eSopenharmony_ci  /**
7261847f8eSopenharmony_ci   * Gets the element number of the ArrayList.This is a number one higher than the highest index in the arraylist.
7361847f8eSopenharmony_ci   *
7461847f8eSopenharmony_ci   * @type { number }
7561847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
7661847f8eSopenharmony_ci   * @since 8
7761847f8eSopenharmony_ci   */
7861847f8eSopenharmony_ci  /**
7961847f8eSopenharmony_ci   * Gets the element number of the ArrayList.This is a number one higher than the highest index in the arraylist.
8061847f8eSopenharmony_ci   *
8161847f8eSopenharmony_ci   * @type { number }
8261847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
8361847f8eSopenharmony_ci   * @crossplatform
8461847f8eSopenharmony_ci   * @since 10
8561847f8eSopenharmony_ci   */
8661847f8eSopenharmony_ci  /**
8761847f8eSopenharmony_ci   * Gets the element number of the ArrayList.This is a number one higher than the highest index in the arraylist.
8861847f8eSopenharmony_ci   *
8961847f8eSopenharmony_ci   * @type { number }
9061847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
9161847f8eSopenharmony_ci   * @crossplatform
9261847f8eSopenharmony_ci   * @atomicservice
9361847f8eSopenharmony_ci   * @since 12
9461847f8eSopenharmony_ci   */
9561847f8eSopenharmony_ci  length: number;
9661847f8eSopenharmony_ci  /**
9761847f8eSopenharmony_ci   * Appends the specified element to the end of this arraylist.
9861847f8eSopenharmony_ci   *
9961847f8eSopenharmony_ci   * @param { T } element - element element to be appended to this arraylist
10061847f8eSopenharmony_ci   * @returns { boolean } the boolean type, returns true if the addition is successful, and returns false if it fails.
10161847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The add method cannot be bound.
10261847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
10361847f8eSopenharmony_ci   * @since 8
10461847f8eSopenharmony_ci   */
10561847f8eSopenharmony_ci  /**
10661847f8eSopenharmony_ci   * Appends the specified element to the end of this arraylist.
10761847f8eSopenharmony_ci   *
10861847f8eSopenharmony_ci   * @param { T } element - element element to be appended to this arraylist
10961847f8eSopenharmony_ci   * @returns { boolean } the boolean type, returns true if the addition is successful, and returns false if it fails.
11061847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The add method cannot be bound.
11161847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
11261847f8eSopenharmony_ci   * @crossplatform
11361847f8eSopenharmony_ci   * @since 10
11461847f8eSopenharmony_ci   */
11561847f8eSopenharmony_ci  /**
11661847f8eSopenharmony_ci   * Appends the specified element to the end of this arraylist.
11761847f8eSopenharmony_ci   *
11861847f8eSopenharmony_ci   * @param { T } element - element element to be appended to this arraylist
11961847f8eSopenharmony_ci   * @returns { boolean } the boolean type, returns true if the addition is successful, and returns false if it fails.
12061847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The add method cannot be bound.
12161847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
12261847f8eSopenharmony_ci   * @crossplatform
12361847f8eSopenharmony_ci   * @atomicservice
12461847f8eSopenharmony_ci   * @since 12
12561847f8eSopenharmony_ci   */
12661847f8eSopenharmony_ci  add(element: T): boolean;
12761847f8eSopenharmony_ci  /**
12861847f8eSopenharmony_ci   * Inserts the specified element at the specified position in this
12961847f8eSopenharmony_ci   * arraylist. Shifts the element currently at that position (if any) and
13061847f8eSopenharmony_ci   * any subsequent elements to the right (adds one to their index).
13161847f8eSopenharmony_ci   *
13261847f8eSopenharmony_ci   * @param { T } element - element element element to be inserted
13361847f8eSopenharmony_ci   * @param { number } index - index index at which the specified element is to be inserted
13461847f8eSopenharmony_ci   * @throws { BusinessError } 10200001 - The value of index is out of range.
13561847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The insert method cannot be bound.
13661847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
13761847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
13861847f8eSopenharmony_ci   * 2.Incorrect parameter types;
13961847f8eSopenharmony_ci   * 3.Parameter verification failed.
14061847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
14161847f8eSopenharmony_ci   * @since 8
14261847f8eSopenharmony_ci   */
14361847f8eSopenharmony_ci  /**
14461847f8eSopenharmony_ci   * Inserts the specified element at the specified position in this
14561847f8eSopenharmony_ci   * arraylist. Shifts the element currently at that position (if any) and
14661847f8eSopenharmony_ci   * any subsequent elements to the right (adds one to their index).
14761847f8eSopenharmony_ci   *
14861847f8eSopenharmony_ci   * @param { T } element - element element element to be inserted
14961847f8eSopenharmony_ci   * @param { number } index - index index at which the specified element is to be inserted
15061847f8eSopenharmony_ci   * @throws { BusinessError } 10200001 - The value of index is out of range.
15161847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The insert method cannot be bound.
15261847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
15361847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
15461847f8eSopenharmony_ci   * 2.Incorrect parameter types;
15561847f8eSopenharmony_ci   * 3.Parameter verification failed.
15661847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
15761847f8eSopenharmony_ci   * @crossplatform
15861847f8eSopenharmony_ci   * @since 10
15961847f8eSopenharmony_ci   */
16061847f8eSopenharmony_ci  /**
16161847f8eSopenharmony_ci   * Inserts the specified element at the specified position in this
16261847f8eSopenharmony_ci   * arraylist. Shifts the element currently at that position (if any) and
16361847f8eSopenharmony_ci   * any subsequent elements to the right (adds one to their index).
16461847f8eSopenharmony_ci   *
16561847f8eSopenharmony_ci   * @param { T } element - element element element to be inserted
16661847f8eSopenharmony_ci   * @param { number } index - index index at which the specified element is to be inserted
16761847f8eSopenharmony_ci   * @throws { BusinessError } 10200001 - The value of index is out of range.
16861847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The insert method cannot be bound.
16961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
17061847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
17161847f8eSopenharmony_ci   * 2.Incorrect parameter types;
17261847f8eSopenharmony_ci   * 3.Parameter verification failed.
17361847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
17461847f8eSopenharmony_ci   * @crossplatform
17561847f8eSopenharmony_ci   * @atomicservice
17661847f8eSopenharmony_ci   * @since 12
17761847f8eSopenharmony_ci   */
17861847f8eSopenharmony_ci  insert(element: T, index: number): void;
17961847f8eSopenharmony_ci  /**
18061847f8eSopenharmony_ci   * Check if arraylist contains the specified element
18161847f8eSopenharmony_ci   *
18261847f8eSopenharmony_ci   * @param { T } element - element element element to be contained
18361847f8eSopenharmony_ci   * @returns { boolean } the boolean type,if arraylist contains the specified element,return true,else return false
18461847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The has method cannot be bound.
18561847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
18661847f8eSopenharmony_ci   * @since 8
18761847f8eSopenharmony_ci   */
18861847f8eSopenharmony_ci  /**
18961847f8eSopenharmony_ci   * Check if arraylist contains the specified element
19061847f8eSopenharmony_ci   *
19161847f8eSopenharmony_ci   * @param { T } element - element element element to be contained
19261847f8eSopenharmony_ci   * @returns { boolean } the boolean type,if arraylist contains the specified element,return true,else return false
19361847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The has method cannot be bound.
19461847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
19561847f8eSopenharmony_ci   * @crossplatform
19661847f8eSopenharmony_ci   * @since 10
19761847f8eSopenharmony_ci   */
19861847f8eSopenharmony_ci  /**
19961847f8eSopenharmony_ci   * Check if arraylist contains the specified element
20061847f8eSopenharmony_ci   *
20161847f8eSopenharmony_ci   * @param { T } element - element element element to be contained
20261847f8eSopenharmony_ci   * @returns { boolean } the boolean type,if arraylist contains the specified element,return true,else return false
20361847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The has method cannot be bound.
20461847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
20561847f8eSopenharmony_ci   * @crossplatform
20661847f8eSopenharmony_ci   * @atomicservice
20761847f8eSopenharmony_ci   * @since 12
20861847f8eSopenharmony_ci   */
20961847f8eSopenharmony_ci  has(element: T): boolean;
21061847f8eSopenharmony_ci  /**
21161847f8eSopenharmony_ci   * Returns the index of the first occurrence of the specified element
21261847f8eSopenharmony_ci   * in this arraylist, or -1 if this arraylist does not contain the element.
21361847f8eSopenharmony_ci   *
21461847f8eSopenharmony_ci   * @param { T } element - element element element to be contained
21561847f8eSopenharmony_ci   * @returns { number } the number type ,returns the lowest index such that or -1 if there is no such index.
21661847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The getIndexOf method cannot be bound.
21761847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
21861847f8eSopenharmony_ci   * @since 8
21961847f8eSopenharmony_ci   */
22061847f8eSopenharmony_ci  /**
22161847f8eSopenharmony_ci   * Returns the index of the first occurrence of the specified element
22261847f8eSopenharmony_ci   * in this arraylist, or -1 if this arraylist does not contain the element.
22361847f8eSopenharmony_ci   *
22461847f8eSopenharmony_ci   * @param { T } element - element element element to be contained
22561847f8eSopenharmony_ci   * @returns { number } the number type ,returns the lowest index such that or -1 if there is no such index.
22661847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The getIndexOf method cannot be bound.
22761847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
22861847f8eSopenharmony_ci   * @crossplatform
22961847f8eSopenharmony_ci   * @since 10
23061847f8eSopenharmony_ci   */
23161847f8eSopenharmony_ci  /**
23261847f8eSopenharmony_ci   * Returns the index of the first occurrence of the specified element
23361847f8eSopenharmony_ci   * in this arraylist, or -1 if this arraylist does not contain the element.
23461847f8eSopenharmony_ci   *
23561847f8eSopenharmony_ci   * @param { T } element - element element element to be contained
23661847f8eSopenharmony_ci   * @returns { number } the number type ,returns the lowest index such that or -1 if there is no such index.
23761847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The getIndexOf method cannot be bound.
23861847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
23961847f8eSopenharmony_ci   * @crossplatform
24061847f8eSopenharmony_ci   * @atomicservice
24161847f8eSopenharmony_ci   * @since 12
24261847f8eSopenharmony_ci   */
24361847f8eSopenharmony_ci  getIndexOf(element: T): number;
24461847f8eSopenharmony_ci  /**
24561847f8eSopenharmony_ci   * Find the corresponding element according to the index,
24661847f8eSopenharmony_ci   * delete the element, and move the index of all elements to the right of the element forward by one.
24761847f8eSopenharmony_ci   *
24861847f8eSopenharmony_ci   * @param { number } index - index index the index in the arraylist
24961847f8eSopenharmony_ci   * @returns { T } the T type ,returns undefined if arraylist is empty,If the index is
25061847f8eSopenharmony_ci   * @throws { BusinessError } 10200001 - The value of index is out of range.
25161847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The removeByIndex method cannot be bound.
25261847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
25361847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
25461847f8eSopenharmony_ci   * 2.Incorrect parameter types;
25561847f8eSopenharmony_ci   * 3.Parameter verification failed.
25661847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
25761847f8eSopenharmony_ci   * @since 8
25861847f8eSopenharmony_ci   */
25961847f8eSopenharmony_ci  /**
26061847f8eSopenharmony_ci   * Find the corresponding element according to the index,
26161847f8eSopenharmony_ci   * delete the element, and move the index of all elements to the right of the element forward by one.
26261847f8eSopenharmony_ci   *
26361847f8eSopenharmony_ci   * @param { number } index - index index the index in the arraylist
26461847f8eSopenharmony_ci   * @returns { T } the T type ,returns undefined if arraylist is empty,If the index is
26561847f8eSopenharmony_ci   * @throws { BusinessError } 10200001 - The value of index is out of range.
26661847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The removeByIndex method cannot be bound.
26761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
26861847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
26961847f8eSopenharmony_ci   * 2.Incorrect parameter types;
27061847f8eSopenharmony_ci   * 3.Parameter verification failed.
27161847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
27261847f8eSopenharmony_ci   * @crossplatform
27361847f8eSopenharmony_ci   * @since 10
27461847f8eSopenharmony_ci   */
27561847f8eSopenharmony_ci  /**
27661847f8eSopenharmony_ci   * Find the corresponding element according to the index,
27761847f8eSopenharmony_ci   * delete the element, and move the index of all elements to the right of the element forward by one.
27861847f8eSopenharmony_ci   *
27961847f8eSopenharmony_ci   * @param { number } index - index index the index in the arraylist
28061847f8eSopenharmony_ci   * @returns { T } the T type ,returns undefined if arraylist is empty,If the index is
28161847f8eSopenharmony_ci   * @throws { BusinessError } 10200001 - The value of index is out of range.
28261847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The removeByIndex method cannot be bound.
28361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
28461847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
28561847f8eSopenharmony_ci   * 2.Incorrect parameter types;
28661847f8eSopenharmony_ci   * 3.Parameter verification failed.
28761847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
28861847f8eSopenharmony_ci   * @crossplatform
28961847f8eSopenharmony_ci   * @atomicservice
29061847f8eSopenharmony_ci   * @since 12
29161847f8eSopenharmony_ci   */
29261847f8eSopenharmony_ci  removeByIndex(index: number): T;
29361847f8eSopenharmony_ci  /**
29461847f8eSopenharmony_ci   * Removes the first occurrence of the specified element from this arraylist,
29561847f8eSopenharmony_ci   * if it is present.  If the arraylist does not contain the element, it is
29661847f8eSopenharmony_ci   * unchanged.  More formally, removes the element with the lowest index
29761847f8eSopenharmony_ci   *
29861847f8eSopenharmony_ci   * @param { T } element - element element element to remove
29961847f8eSopenharmony_ci   * @returns { boolean } the boolean type ,If there is no such element, return false
30061847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The remove method cannot be bound.
30161847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
30261847f8eSopenharmony_ci   * @since 8
30361847f8eSopenharmony_ci   */
30461847f8eSopenharmony_ci  /**
30561847f8eSopenharmony_ci   * Removes the first occurrence of the specified element from this arraylist,
30661847f8eSopenharmony_ci   * if it is present.  If the arraylist does not contain the element, it is
30761847f8eSopenharmony_ci   * unchanged.  More formally, removes the element with the lowest index
30861847f8eSopenharmony_ci   *
30961847f8eSopenharmony_ci   * @param { T } element - element element element to remove
31061847f8eSopenharmony_ci   * @returns { boolean } the boolean type ,If there is no such element, return false
31161847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The remove method cannot be bound.
31261847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
31361847f8eSopenharmony_ci   * @crossplatform
31461847f8eSopenharmony_ci   * @since 10
31561847f8eSopenharmony_ci   */
31661847f8eSopenharmony_ci  /**
31761847f8eSopenharmony_ci   * Removes the first occurrence of the specified element from this arraylist,
31861847f8eSopenharmony_ci   * if it is present.  If the arraylist does not contain the element, it is
31961847f8eSopenharmony_ci   * unchanged.  More formally, removes the element with the lowest index
32061847f8eSopenharmony_ci   *
32161847f8eSopenharmony_ci   * @param { T } element - element element element to remove
32261847f8eSopenharmony_ci   * @returns { boolean } the boolean type ,If there is no such element, return false
32361847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The remove method cannot be bound.
32461847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
32561847f8eSopenharmony_ci   * @crossplatform
32661847f8eSopenharmony_ci   * @atomicservice
32761847f8eSopenharmony_ci   * @since 12
32861847f8eSopenharmony_ci   */
32961847f8eSopenharmony_ci  remove(element: T): boolean;
33061847f8eSopenharmony_ci  /**
33161847f8eSopenharmony_ci   * Returns in the index of the last occurrence of the specified element in this arraylist ,
33261847f8eSopenharmony_ci   * or -1 if the arraylist does not contain the element.
33361847f8eSopenharmony_ci   *
33461847f8eSopenharmony_ci   * @param { T } element - element element element to find
33561847f8eSopenharmony_ci   * @returns { number } the number type
33661847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The getLastIndexOf method cannot be bound.
33761847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
33861847f8eSopenharmony_ci   * @since 8
33961847f8eSopenharmony_ci   */
34061847f8eSopenharmony_ci  /**
34161847f8eSopenharmony_ci   * Returns in the index of the last occurrence of the specified element in this arraylist ,
34261847f8eSopenharmony_ci   * or -1 if the arraylist does not contain the element.
34361847f8eSopenharmony_ci   *
34461847f8eSopenharmony_ci   * @param { T } element - element element element to find
34561847f8eSopenharmony_ci   * @returns { number } the number type
34661847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The getLastIndexOf method cannot be bound.
34761847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
34861847f8eSopenharmony_ci   * @crossplatform
34961847f8eSopenharmony_ci   * @since 10
35061847f8eSopenharmony_ci   */
35161847f8eSopenharmony_ci  /**
35261847f8eSopenharmony_ci   * Returns in the index of the last occurrence of the specified element in this arraylist ,
35361847f8eSopenharmony_ci   * or -1 if the arraylist does not contain the element.
35461847f8eSopenharmony_ci   *
35561847f8eSopenharmony_ci   * @param { T } element - element element element to find
35661847f8eSopenharmony_ci   * @returns { number } the number type
35761847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The getLastIndexOf method cannot be bound.
35861847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
35961847f8eSopenharmony_ci   * @crossplatform
36061847f8eSopenharmony_ci   * @atomicservice
36161847f8eSopenharmony_ci   * @since 12
36261847f8eSopenharmony_ci   */
36361847f8eSopenharmony_ci  getLastIndexOf(element: T): number;
36461847f8eSopenharmony_ci  /**
36561847f8eSopenharmony_ci   * Removes from this arraylist all of the elements whose index is between fromIndex,inclusive,and toIndex ,exclusive.
36661847f8eSopenharmony_ci   *
36761847f8eSopenharmony_ci   * @param { number } fromIndex - fromIndex fromIndex The starting position of the index, containing the value at that index position
36861847f8eSopenharmony_ci   * @param { number } toIndex - toIndex toIndex the end of the index, excluding the value at that index
36961847f8eSopenharmony_ci   * @throws { BusinessError } 10200001 - The value of fromIndex or toIndex is out of range.
37061847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The removeByRange method cannot be bound.
37161847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
37261847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
37361847f8eSopenharmony_ci   * 2.Incorrect parameter types;
37461847f8eSopenharmony_ci   * 3.Parameter verification failed.
37561847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
37661847f8eSopenharmony_ci   * @since 8
37761847f8eSopenharmony_ci   */
37861847f8eSopenharmony_ci  /**
37961847f8eSopenharmony_ci   * Removes from this arraylist all of the elements whose index is between fromIndex,inclusive,and toIndex ,exclusive.
38061847f8eSopenharmony_ci   *
38161847f8eSopenharmony_ci   * @param { number } fromIndex - fromIndex fromIndex The starting position of the index, containing the value at that index position
38261847f8eSopenharmony_ci   * @param { number } toIndex - toIndex toIndex the end of the index, excluding the value at that index
38361847f8eSopenharmony_ci   * @throws { BusinessError } 10200001 - The value of fromIndex or toIndex is out of range.
38461847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The removeByRange method cannot be bound.
38561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
38661847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
38761847f8eSopenharmony_ci   * 2.Incorrect parameter types;
38861847f8eSopenharmony_ci   * 3.Parameter verification failed.
38961847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
39061847f8eSopenharmony_ci   * @crossplatform
39161847f8eSopenharmony_ci   * @since 10
39261847f8eSopenharmony_ci   */
39361847f8eSopenharmony_ci  /**
39461847f8eSopenharmony_ci   * Removes from this arraylist all of the elements whose index is between fromIndex,inclusive,and toIndex ,exclusive.
39561847f8eSopenharmony_ci   *
39661847f8eSopenharmony_ci   * @param { number } fromIndex - fromIndex fromIndex The starting position of the index, containing the value at that index position
39761847f8eSopenharmony_ci   * @param { number } toIndex - toIndex toIndex the end of the index, excluding the value at that index
39861847f8eSopenharmony_ci   * @throws { BusinessError } 10200001 - The value of fromIndex or toIndex is out of range.
39961847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The removeByRange method cannot be bound.
40061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
40161847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
40261847f8eSopenharmony_ci   * 2.Incorrect parameter types;
40361847f8eSopenharmony_ci   * 3.Parameter verification failed.
40461847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
40561847f8eSopenharmony_ci   * @crossplatform
40661847f8eSopenharmony_ci   * @atomicservice
40761847f8eSopenharmony_ci   * @since 12
40861847f8eSopenharmony_ci   */
40961847f8eSopenharmony_ci  removeByRange(fromIndex: number, toIndex: number): void;
41061847f8eSopenharmony_ci  /**
41161847f8eSopenharmony_ci   * Replaces each element of this arraylist with the result of applying the operator to that element.
41261847f8eSopenharmony_ci   *
41361847f8eSopenharmony_ci   * @param { function } callbackFn - callbackFn
41461847f8eSopenharmony_ci   * callbackFn (required) A function that accepts up to three arguments.
41561847f8eSopenharmony_ci   * The function to be called for each element.
41661847f8eSopenharmony_ci   * @param { Object } [thisArg] - thisArg
41761847f8eSopenharmony_ci   * thisArg (Optional) The value to be used as this value for when callbackFn is called.
41861847f8eSopenharmony_ci   * If thisArg is omitted, undefined is used as the this value.
41961847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The replaceAllElements method cannot be bound.
42061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
42161847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
42261847f8eSopenharmony_ci   * 2.Incorrect parameter types.
42361847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
42461847f8eSopenharmony_ci   * @since 8
42561847f8eSopenharmony_ci   */
42661847f8eSopenharmony_ci  /**
42761847f8eSopenharmony_ci   * Replaces each element of this arraylist with the result of applying the operator to that element.
42861847f8eSopenharmony_ci   *
42961847f8eSopenharmony_ci   * @param { function } callbackFn - callbackFn
43061847f8eSopenharmony_ci   * callbackFn (required) A function that accepts up to three arguments.
43161847f8eSopenharmony_ci   * The function to be called for each element.
43261847f8eSopenharmony_ci   * @param { Object } [thisArg] - thisArg
43361847f8eSopenharmony_ci   * thisArg (Optional) The value to be used as this value for when callbackFn is called.
43461847f8eSopenharmony_ci   * If thisArg is omitted, undefined is used as the this value.
43561847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The replaceAllElements method cannot be bound.
43661847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
43761847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
43861847f8eSopenharmony_ci   * 2.Incorrect parameter types.
43961847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
44061847f8eSopenharmony_ci   * @crossplatform
44161847f8eSopenharmony_ci   * @since 10
44261847f8eSopenharmony_ci   */
44361847f8eSopenharmony_ci  /**
44461847f8eSopenharmony_ci   * Replaces each element of this arraylist with the result of applying the operator to that element.
44561847f8eSopenharmony_ci   *
44661847f8eSopenharmony_ci   * @param { function } callbackFn - callbackFn
44761847f8eSopenharmony_ci   * callbackFn (required) A function that accepts up to three arguments.
44861847f8eSopenharmony_ci   * The function to be called for each element.
44961847f8eSopenharmony_ci   * @param { Object } [thisArg] - thisArg
45061847f8eSopenharmony_ci   * thisArg (Optional) The value to be used as this value for when callbackFn is called.
45161847f8eSopenharmony_ci   * If thisArg is omitted, undefined is used as the this value.
45261847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The replaceAllElements method cannot be bound.
45361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
45461847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
45561847f8eSopenharmony_ci   * 2.Incorrect parameter types.
45661847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
45761847f8eSopenharmony_ci   * @crossplatform
45861847f8eSopenharmony_ci   * @atomicservice
45961847f8eSopenharmony_ci   * @since 12
46061847f8eSopenharmony_ci   */
46161847f8eSopenharmony_ci  replaceAllElements(callbackFn: (value: T, index?: number, arrlist?: ArrayList<T>) => T, thisArg?: Object): void;
46261847f8eSopenharmony_ci  /**
46361847f8eSopenharmony_ci   * Executes a provided function once for each value in the arraylist object.
46461847f8eSopenharmony_ci   *
46561847f8eSopenharmony_ci   * @param { function } callbackFn - callbackFn
46661847f8eSopenharmony_ci   * callbackFn (required) A function that accepts up to three arguments.
46761847f8eSopenharmony_ci   * The function to be called for each element.
46861847f8eSopenharmony_ci   * @param { Object } [thisArg] - thisArg
46961847f8eSopenharmony_ci   * thisArg (Optional) The value to be used as this value for when callbackFn is called.
47061847f8eSopenharmony_ci   * If thisArg is omitted, undefined is used as the this value.
47161847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The forEach method cannot be bound.
47261847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
47361847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
47461847f8eSopenharmony_ci   * 2.Incorrect parameter types.
47561847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
47661847f8eSopenharmony_ci   * @since 8
47761847f8eSopenharmony_ci   */
47861847f8eSopenharmony_ci  /**
47961847f8eSopenharmony_ci   * Executes a provided function once for each value in the arraylist object.
48061847f8eSopenharmony_ci   *
48161847f8eSopenharmony_ci   * @param { function } callbackFn - callbackFn
48261847f8eSopenharmony_ci   * callbackFn (required) A function that accepts up to three arguments.
48361847f8eSopenharmony_ci   * The function to be called for each element.
48461847f8eSopenharmony_ci   * @param { Object } [thisArg] - thisArg
48561847f8eSopenharmony_ci   * thisArg (Optional) The value to be used as this value for when callbackFn is called.
48661847f8eSopenharmony_ci   * If thisArg is omitted, undefined is used as the this value.
48761847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The forEach method cannot be bound.
48861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
48961847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
49061847f8eSopenharmony_ci   * 2.Incorrect parameter types.
49161847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
49261847f8eSopenharmony_ci   * @crossplatform
49361847f8eSopenharmony_ci   * @since 10
49461847f8eSopenharmony_ci   */
49561847f8eSopenharmony_ci  /**
49661847f8eSopenharmony_ci   * Executes a provided function once for each value in the arraylist object.
49761847f8eSopenharmony_ci   *
49861847f8eSopenharmony_ci   * @param { function } callbackFn - callbackFn
49961847f8eSopenharmony_ci   * callbackFn (required) A function that accepts up to three arguments.
50061847f8eSopenharmony_ci   * The function to be called for each element.
50161847f8eSopenharmony_ci   * @param { Object } [thisArg] - thisArg
50261847f8eSopenharmony_ci   * thisArg (Optional) The value to be used as this value for when callbackFn is called.
50361847f8eSopenharmony_ci   * If thisArg is omitted, undefined is used as the this value.
50461847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The forEach method cannot be bound.
50561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
50661847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
50761847f8eSopenharmony_ci   * 2.Incorrect parameter types.
50861847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
50961847f8eSopenharmony_ci   * @crossplatform
51061847f8eSopenharmony_ci   * @atomicservice
51161847f8eSopenharmony_ci   * @since 12
51261847f8eSopenharmony_ci   */
51361847f8eSopenharmony_ci  forEach(callbackFn: (value: T, index?: number, arrlist?: ArrayList<T>) => void, thisArg?: Object): void;
51461847f8eSopenharmony_ci  /**
51561847f8eSopenharmony_ci   * Sorts this arraylist according to the order induced by the specified comparator,without comparator this parameter,
51661847f8eSopenharmony_ci   * it will default to ASCII sorting
51761847f8eSopenharmony_ci   *
51861847f8eSopenharmony_ci   * @param { function } [comparator] - comparator
51961847f8eSopenharmony_ci   * comparator (Optional) A function that accepts up to two arguments.Specifies the sort order.
52061847f8eSopenharmony_ci   * Must be a function,return number type,If it returns firstValue minus secondValue, it returns an arraylist
52161847f8eSopenharmony_ci   * sorted in ascending order;If it returns secondValue minus firstValue, it returns an arraylist sorted in descending order;
52261847f8eSopenharmony_ci   * If this parameter is empty, it will default to ASCII sorting
52361847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The sort method cannot be bound.
52461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
52561847f8eSopenharmony_ci   * 1.Incorrect parameter types;
52661847f8eSopenharmony_ci   * 2.Parameter verification failed.
52761847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
52861847f8eSopenharmony_ci   * @since 8
52961847f8eSopenharmony_ci   */
53061847f8eSopenharmony_ci  /**
53161847f8eSopenharmony_ci   * Sorts this arraylist according to the order induced by the specified comparator,without comparator this parameter,
53261847f8eSopenharmony_ci   * it will default to ASCII sorting
53361847f8eSopenharmony_ci   *
53461847f8eSopenharmony_ci   * @param { function } [comparator] - comparator
53561847f8eSopenharmony_ci   * comparator (Optional) A function that accepts up to two arguments.Specifies the sort order.
53661847f8eSopenharmony_ci   * Must be a function,return number type,If it returns firstValue minus secondValue, it returns an arraylist
53761847f8eSopenharmony_ci   * sorted in ascending order;If it returns secondValue minus firstValue, it returns an arraylist sorted in descending order;
53861847f8eSopenharmony_ci   * If this parameter is empty, it will default to ASCII sorting
53961847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The sort method cannot be bound.
54061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
54161847f8eSopenharmony_ci   * 1.Incorrect parameter types;
54261847f8eSopenharmony_ci   * 2.Parameter verification failed.
54361847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
54461847f8eSopenharmony_ci   * @crossplatform
54561847f8eSopenharmony_ci   * @since 10
54661847f8eSopenharmony_ci   */
54761847f8eSopenharmony_ci  /**
54861847f8eSopenharmony_ci   * Sorts this arraylist according to the order induced by the specified comparator,without comparator this parameter,
54961847f8eSopenharmony_ci   * it will default to ASCII sorting
55061847f8eSopenharmony_ci   *
55161847f8eSopenharmony_ci   * @param { function } [comparator] - comparator
55261847f8eSopenharmony_ci   * comparator (Optional) A function that accepts up to two arguments.Specifies the sort order.
55361847f8eSopenharmony_ci   * Must be a function,return number type,If it returns firstValue minus secondValue, it returns an arraylist
55461847f8eSopenharmony_ci   * sorted in ascending order;If it returns secondValue minus firstValue, it returns an arraylist sorted in descending order;
55561847f8eSopenharmony_ci   * If this parameter is empty, it will default to ASCII sorting
55661847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The sort method cannot be bound.
55761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
55861847f8eSopenharmony_ci   * 1.Incorrect parameter types;
55961847f8eSopenharmony_ci   * 2.Parameter verification failed.
56061847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
56161847f8eSopenharmony_ci   * @crossplatform
56261847f8eSopenharmony_ci   * @atomicservice
56361847f8eSopenharmony_ci   * @since 12
56461847f8eSopenharmony_ci   */
56561847f8eSopenharmony_ci  sort(comparator?: (firstValue: T, secondValue: T) => number): void;
56661847f8eSopenharmony_ci  /**
56761847f8eSopenharmony_ci   * Returns a view of the portion of this arraylist between the specified fromIndex,inclusive,and toIndex,exclusive
56861847f8eSopenharmony_ci   *
56961847f8eSopenharmony_ci   * @param { number } fromIndex - fromIndex fromIndex The starting position of the index, containing the value at that index position
57061847f8eSopenharmony_ci   * @param { number } toIndex - toIndex toIndex the end of the index, excluding the value at that index
57161847f8eSopenharmony_ci   * @returns { ArrayList<T> }
57261847f8eSopenharmony_ci   * @throws { BusinessError } 10200001 - The value of fromIndex or toIndex is out of range.
57361847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The subArrayList method cannot be bound.
57461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
57561847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
57661847f8eSopenharmony_ci   * 2.Incorrect parameter types;
57761847f8eSopenharmony_ci   * 3.Parameter verification failed.
57861847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
57961847f8eSopenharmony_ci   * @since 8
58061847f8eSopenharmony_ci   */
58161847f8eSopenharmony_ci  /**
58261847f8eSopenharmony_ci   * Returns a view of the portion of this arraylist between the specified fromIndex,inclusive,and toIndex,exclusive
58361847f8eSopenharmony_ci   *
58461847f8eSopenharmony_ci   * @param { number } fromIndex - fromIndex fromIndex The starting position of the index, containing the value at that index position
58561847f8eSopenharmony_ci   * @param { number } toIndex - toIndex toIndex the end of the index, excluding the value at that index
58661847f8eSopenharmony_ci   * @returns { ArrayList<T> }
58761847f8eSopenharmony_ci   * @throws { BusinessError } 10200001 - The value of fromIndex or toIndex is out of range.
58861847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The subArrayList method cannot be bound.
58961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
59061847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
59161847f8eSopenharmony_ci   * 2.Incorrect parameter types;
59261847f8eSopenharmony_ci   * 3.Parameter verification failed.
59361847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
59461847f8eSopenharmony_ci   * @crossplatform
59561847f8eSopenharmony_ci   * @since 10
59661847f8eSopenharmony_ci   */
59761847f8eSopenharmony_ci  /**
59861847f8eSopenharmony_ci   * Returns a view of the portion of this arraylist between the specified fromIndex,inclusive,and toIndex,exclusive
59961847f8eSopenharmony_ci   *
60061847f8eSopenharmony_ci   * @param { number } fromIndex - fromIndex fromIndex The starting position of the index, containing the value at that index position
60161847f8eSopenharmony_ci   * @param { number } toIndex - toIndex toIndex the end of the index, excluding the value at that index
60261847f8eSopenharmony_ci   * @returns { ArrayList<T> }
60361847f8eSopenharmony_ci   * @throws { BusinessError } 10200001 - The value of fromIndex or toIndex is out of range.
60461847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The subArrayList method cannot be bound.
60561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
60661847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
60761847f8eSopenharmony_ci   * 2.Incorrect parameter types;
60861847f8eSopenharmony_ci   * 3.Parameter verification failed.
60961847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
61061847f8eSopenharmony_ci   * @crossplatform
61161847f8eSopenharmony_ci   * @atomicservice
61261847f8eSopenharmony_ci   * @since 12
61361847f8eSopenharmony_ci   */
61461847f8eSopenharmony_ci  subArrayList(fromIndex: number, toIndex: number): ArrayList<T>;
61561847f8eSopenharmony_ci  /**
61661847f8eSopenharmony_ci   * Removes all of the elements from this arraylist.The arraylist will
61761847f8eSopenharmony_ci   * be empty after this call returns.length becomes 0
61861847f8eSopenharmony_ci   *
61961847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The clear method cannot be bound.
62061847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
62161847f8eSopenharmony_ci   * @since 8
62261847f8eSopenharmony_ci   */
62361847f8eSopenharmony_ci  /**
62461847f8eSopenharmony_ci   * Removes all of the elements from this arraylist.The arraylist will
62561847f8eSopenharmony_ci   * be empty after this call returns.length becomes 0
62661847f8eSopenharmony_ci   *
62761847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The clear method cannot be bound.
62861847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
62961847f8eSopenharmony_ci   * @crossplatform
63061847f8eSopenharmony_ci   * @since 10
63161847f8eSopenharmony_ci   */
63261847f8eSopenharmony_ci  /**
63361847f8eSopenharmony_ci   * Removes all of the elements from this arraylist.The arraylist will
63461847f8eSopenharmony_ci   * be empty after this call returns.length becomes 0
63561847f8eSopenharmony_ci   *
63661847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The clear method cannot be bound.
63761847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
63861847f8eSopenharmony_ci   * @crossplatform
63961847f8eSopenharmony_ci   * @atomicservice
64061847f8eSopenharmony_ci   * @since 12
64161847f8eSopenharmony_ci   */
64261847f8eSopenharmony_ci  clear(): void;
64361847f8eSopenharmony_ci  /**
64461847f8eSopenharmony_ci   * Returns a shallow copy of this instance. (The elements themselves are not copied.)
64561847f8eSopenharmony_ci   *
64661847f8eSopenharmony_ci   * @returns { ArrayList<T> } this arraylist instance
64761847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The clone method cannot be bound.
64861847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
64961847f8eSopenharmony_ci   * @since 8
65061847f8eSopenharmony_ci   */
65161847f8eSopenharmony_ci  /**
65261847f8eSopenharmony_ci   * Returns a shallow copy of this instance. (The elements themselves are not copied.)
65361847f8eSopenharmony_ci   *
65461847f8eSopenharmony_ci   * @returns { ArrayList<T> } this arraylist instance
65561847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The clone method cannot be bound.
65661847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
65761847f8eSopenharmony_ci   * @crossplatform
65861847f8eSopenharmony_ci   * @since 10
65961847f8eSopenharmony_ci   */
66061847f8eSopenharmony_ci  /**
66161847f8eSopenharmony_ci   * Returns a shallow copy of this instance. (The elements themselves are not copied.)
66261847f8eSopenharmony_ci   *
66361847f8eSopenharmony_ci   * @returns { ArrayList<T> } this arraylist instance
66461847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The clone method cannot be bound.
66561847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
66661847f8eSopenharmony_ci   * @crossplatform
66761847f8eSopenharmony_ci   * @atomicservice
66861847f8eSopenharmony_ci   * @since 12
66961847f8eSopenharmony_ci   */
67061847f8eSopenharmony_ci  clone(): ArrayList<T>;
67161847f8eSopenharmony_ci  /**
67261847f8eSopenharmony_ci   * returns the capacity of this arraylist
67361847f8eSopenharmony_ci   *
67461847f8eSopenharmony_ci   * @returns { number } the number type
67561847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The getCapacity method cannot be bound.
67661847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
67761847f8eSopenharmony_ci   * @since 8
67861847f8eSopenharmony_ci   */
67961847f8eSopenharmony_ci  /**
68061847f8eSopenharmony_ci   * returns the capacity of this arraylist
68161847f8eSopenharmony_ci   *
68261847f8eSopenharmony_ci   * @returns { number } the number type
68361847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The getCapacity method cannot be bound.
68461847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
68561847f8eSopenharmony_ci   * @crossplatform
68661847f8eSopenharmony_ci   * @since 10
68761847f8eSopenharmony_ci   */
68861847f8eSopenharmony_ci  /**
68961847f8eSopenharmony_ci   * returns the capacity of this arraylist
69061847f8eSopenharmony_ci   *
69161847f8eSopenharmony_ci   * @returns { number } the number type
69261847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The getCapacity method cannot be bound.
69361847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
69461847f8eSopenharmony_ci   * @crossplatform
69561847f8eSopenharmony_ci   * @atomicservice
69661847f8eSopenharmony_ci   * @since 12
69761847f8eSopenharmony_ci   */
69861847f8eSopenharmony_ci  getCapacity(): number;
69961847f8eSopenharmony_ci  /**
70061847f8eSopenharmony_ci   * convert arraylist to array
70161847f8eSopenharmony_ci   *
70261847f8eSopenharmony_ci   * @returns { Array<T> } the Array type
70361847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The convertToArray method cannot be bound.
70461847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
70561847f8eSopenharmony_ci   * @since 8
70661847f8eSopenharmony_ci   */
70761847f8eSopenharmony_ci  /**
70861847f8eSopenharmony_ci   * convert arraylist to array
70961847f8eSopenharmony_ci   *
71061847f8eSopenharmony_ci   * @returns { Array<T> } the Array type
71161847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The convertToArray method cannot be bound.
71261847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
71361847f8eSopenharmony_ci   * @crossplatform
71461847f8eSopenharmony_ci   * @since 10
71561847f8eSopenharmony_ci   */
71661847f8eSopenharmony_ci  /**
71761847f8eSopenharmony_ci   * convert arraylist to array
71861847f8eSopenharmony_ci   *
71961847f8eSopenharmony_ci   * @returns { Array<T> } the Array type
72061847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The convertToArray method cannot be bound.
72161847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
72261847f8eSopenharmony_ci   * @crossplatform
72361847f8eSopenharmony_ci   * @atomicservice
72461847f8eSopenharmony_ci   * @since 12
72561847f8eSopenharmony_ci   */
72661847f8eSopenharmony_ci  convertToArray(): Array<T>;
72761847f8eSopenharmony_ci  /**
72861847f8eSopenharmony_ci   * Determine whether arraylist is empty and whether there is an element
72961847f8eSopenharmony_ci   *
73061847f8eSopenharmony_ci   * @returns { boolean } the boolean type
73161847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The isEmpty method cannot be bound.
73261847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
73361847f8eSopenharmony_ci   * @since 8
73461847f8eSopenharmony_ci   */
73561847f8eSopenharmony_ci  /**
73661847f8eSopenharmony_ci   * Determine whether arraylist is empty and whether there is an element
73761847f8eSopenharmony_ci   *
73861847f8eSopenharmony_ci   * @returns { boolean } the boolean type
73961847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The isEmpty method cannot be bound.
74061847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
74161847f8eSopenharmony_ci   * @crossplatform
74261847f8eSopenharmony_ci   * @since 10
74361847f8eSopenharmony_ci   */
74461847f8eSopenharmony_ci  /**
74561847f8eSopenharmony_ci   * Determine whether arraylist is empty and whether there is an element
74661847f8eSopenharmony_ci   *
74761847f8eSopenharmony_ci   * @returns { boolean } the boolean type
74861847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The isEmpty method cannot be bound.
74961847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
75061847f8eSopenharmony_ci   * @crossplatform
75161847f8eSopenharmony_ci   * @atomicservice
75261847f8eSopenharmony_ci   * @since 12
75361847f8eSopenharmony_ci   */
75461847f8eSopenharmony_ci  isEmpty(): boolean;
75561847f8eSopenharmony_ci  /**
75661847f8eSopenharmony_ci   * Returns the item at that index.
75761847f8eSopenharmony_ci   * 
75861847f8eSopenharmony_ci   * @param { number } index - The zero-based index of the desired code unit.
75961847f8eSopenharmony_ci   *     Throws error if index < 0 or index >= arraylist.length.
76061847f8eSopenharmony_ci   * @returns { T } The element in the arraylist matching the given index. 
76161847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error.
76261847f8eSopenharmony_ci   * @throws { BusinessError } 10200001 - The value of index is out of range.
76361847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
76461847f8eSopenharmony_ci   * @atomicservice
76561847f8eSopenharmony_ci   * @since 12
76661847f8eSopenharmony_ci   */
76761847f8eSopenharmony_ci  [index: number]: T;
76861847f8eSopenharmony_ci  /**
76961847f8eSopenharmony_ci   * If the newCapacity provided by the user is greater than or equal to length,
77061847f8eSopenharmony_ci   * change the capacity of the arraylist to newCapacity, otherwise the capacity will not be changed
77161847f8eSopenharmony_ci   *
77261847f8eSopenharmony_ci   * @param { number } newCapacity - newCapacity newCapacity
77361847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The increaseCapacityTo method cannot be bound.
77461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
77561847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
77661847f8eSopenharmony_ci   * 2.Incorrect parameter types.
77761847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
77861847f8eSopenharmony_ci   * @since 8
77961847f8eSopenharmony_ci   */
78061847f8eSopenharmony_ci  /**
78161847f8eSopenharmony_ci   * If the newCapacity provided by the user is greater than or equal to length,
78261847f8eSopenharmony_ci   * change the capacity of the arraylist to newCapacity, otherwise the capacity will not be changed
78361847f8eSopenharmony_ci   *
78461847f8eSopenharmony_ci   * @param { number } newCapacity - newCapacity newCapacity
78561847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The increaseCapacityTo method cannot be bound.
78661847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
78761847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
78861847f8eSopenharmony_ci   * 2.Incorrect parameter types.
78961847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
79061847f8eSopenharmony_ci   * @crossplatform
79161847f8eSopenharmony_ci   * @since 10
79261847f8eSopenharmony_ci   */
79361847f8eSopenharmony_ci  /**
79461847f8eSopenharmony_ci   * If the newCapacity provided by the user is greater than or equal to length,
79561847f8eSopenharmony_ci   * change the capacity of the arraylist to newCapacity, otherwise the capacity will not be changed
79661847f8eSopenharmony_ci   *
79761847f8eSopenharmony_ci   * @param { number } newCapacity - newCapacity newCapacity
79861847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The increaseCapacityTo method cannot be bound.
79961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
80061847f8eSopenharmony_ci   * 1.Mandatory parameters are left unspecified;
80161847f8eSopenharmony_ci   * 2.Incorrect parameter types.
80261847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
80361847f8eSopenharmony_ci   * @crossplatform
80461847f8eSopenharmony_ci   * @atomicservice
80561847f8eSopenharmony_ci   * @since 12
80661847f8eSopenharmony_ci   */
80761847f8eSopenharmony_ci  increaseCapacityTo(newCapacity: number): void;
80861847f8eSopenharmony_ci  /**
80961847f8eSopenharmony_ci   * Limit the capacity to the current length
81061847f8eSopenharmony_ci   *
81161847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The trimToCurrentLength method cannot be bound.
81261847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
81361847f8eSopenharmony_ci   * @since 8
81461847f8eSopenharmony_ci   */
81561847f8eSopenharmony_ci  /**
81661847f8eSopenharmony_ci   * Limit the capacity to the current length
81761847f8eSopenharmony_ci   *
81861847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The trimToCurrentLength method cannot be bound.
81961847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
82061847f8eSopenharmony_ci   * @crossplatform
82161847f8eSopenharmony_ci   * @since 10
82261847f8eSopenharmony_ci   */
82361847f8eSopenharmony_ci  /**
82461847f8eSopenharmony_ci   * Limit the capacity to the current length
82561847f8eSopenharmony_ci   *
82661847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The trimToCurrentLength method cannot be bound.
82761847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
82861847f8eSopenharmony_ci   * @crossplatform
82961847f8eSopenharmony_ci   * @atomicservice
83061847f8eSopenharmony_ci   * @since 12
83161847f8eSopenharmony_ci   */
83261847f8eSopenharmony_ci  trimToCurrentLength(): void;
83361847f8eSopenharmony_ci  /**
83461847f8eSopenharmony_ci   * returns an iterator.Each item of the iterator is a Javascript Object
83561847f8eSopenharmony_ci   *
83661847f8eSopenharmony_ci   * @returns { IterableIterator<T> }
83761847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound.
83861847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
83961847f8eSopenharmony_ci   * @since 8
84061847f8eSopenharmony_ci   */
84161847f8eSopenharmony_ci  /**
84261847f8eSopenharmony_ci   * returns an iterator.Each item of the iterator is a Javascript Object
84361847f8eSopenharmony_ci   *
84461847f8eSopenharmony_ci   * @returns { IterableIterator<T> }
84561847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound.
84661847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
84761847f8eSopenharmony_ci   * @crossplatform
84861847f8eSopenharmony_ci   * @since 10
84961847f8eSopenharmony_ci   */
85061847f8eSopenharmony_ci  /**
85161847f8eSopenharmony_ci   * returns an iterator.Each item of the iterator is a Javascript Object
85261847f8eSopenharmony_ci   *
85361847f8eSopenharmony_ci   * @returns { IterableIterator<T> }
85461847f8eSopenharmony_ci   * @throws { BusinessError } 10200011 - The Symbol.iterator method cannot be bound.
85561847f8eSopenharmony_ci   * @syscap SystemCapability.Utils.Lang
85661847f8eSopenharmony_ci   * @crossplatform
85761847f8eSopenharmony_ci   * @atomicservice
85861847f8eSopenharmony_ci   * @since 12
85961847f8eSopenharmony_ci   */
86061847f8eSopenharmony_ci  [Symbol.iterator](): IterableIterator<T>;
86161847f8eSopenharmony_ci}
86261847f8eSopenharmony_ci
86361847f8eSopenharmony_ciexport default ArrayList;
864