-
-
Add a data source to the collection.
Name |
Type |
Description |
dataSource |
DataSource
|
Promise.<DataSource>
|
The data source or the promise of the data source to be added. The data source is added to the collection after passing the promise resolution successfully. |
Returns:
The data source is added to the collection of resolved promises.
-
contains(dataSource) → Boolean
-
Check whether the specified data source is contained in the collection.
Name |
Type |
Description |
dataSource |
DataSource
|
Datasource to be checked.
|
Returns:
true Returns true if the set contains, otherwise returns false.
-
-
Releases resources occupied by all data sources in the collection. Once the object resource is released, it cannot be used; calling any method will throw
DeveloperError
abnormal.
Throws:
Example:
dataSourceCollection = dataSourceCollection && dataSourceCollection.destroy();
See:
-
-
Gets the data source of the specified index in the collection.
Name |
Type |
Description |
index |
Number
|
The specified index number. |
Returns:
data source.
-
indexOf(dataSource) → Number
-
Determines the index number of the specified data source within the collection.
Name |
Type |
Description |
dataSource |
DataSource
|
The data source to retrieve. |
Returns:
The index number of the data source in the collection, if the collection does not contain the data source, return -1.
-
-
Returns true if the object is destroyed, false otherwise. Once the object resource is released, it cannot be used; calling any method will throw
DeveloperError
abnormal.
Returns:
See:
-
remove(dataSource, destroy) → Boolean
-
Removes a data source from the collection.
Name |
Type |
Default |
Description |
dataSource |
DataSource
|
|
The data source to be removed. |
destroy |
Boolean
|
false
|
optional
Specifies whether to destroy the data source after removal. |
Returns:
After the data source in the collection is removed, true is returned; if the data source does not exist in the collection, the removal fails and false is returned.
-
-
Removes all data sources in the collection.
Name |
Type |
Default |
Description |
destroy |
Boolean
|
false
|
optional
Specifies whether to destroy the data source after removal. |