A collection of
DataSource instances.
Members
Methods
add(dataSource) → Promise.<DataSource>
将数据源添加到收藏中.
| Name | Type | Description |
|---|---|---|
dataSource |
DataSource | Promise.<DataSource> | 数据源或对数据源的许诺可以添加到收集中. 在通过承诺时, 数据源将不会被实际添加 直到承诺成功实现为止. |
Returns:
一旦数据源被添加到收藏中,则解决的 Promise .
检查收藏是否包含给定的数据源 .
| Name | Type | Description |
|---|---|---|
dataSource |
DataSource | 要检查的数据源 . |
Returns:
如果收集中包含数据源,则真实性为真.
摧毁此收藏中所有数据来源所持有的资源。 明目张胆地摧毁它
对象允许确定释放 NT 0 资源,而不是依赖垃圾
collector. Once this object is destroyed, it should not be used; calling any function other than
isDestroyed will result in a DeveloperError exception. Therefore,
assign the return value (undefined) to the object as done in the example.
Throws:
-
DeveloperError : This object was destroyed, i.e., destroy() was called.
Example:
dataSourceCollection = dataSourceCollection && dataSourceCollection.destroy();
See:
get(index) → DataSource
从收集中按索引获取数据源.
| Name | Type | Description |
|---|---|---|
index |
number | 用于检索的索引. |
Returns:
指定索引的数据源.
getByName(name) → Array.<DataSource>
从收集中获取一个名称的数据源.
| Name | Type | Description |
|---|---|---|
name |
string | 取来之名. |
Returns:
匹配所提供名称的所有数据源列表 .
确定收集中特定数据源的索引.
| Name | Type | Description |
|---|---|---|
dataSource |
DataSource | 查找索引的数据源 . |
Returns:
收集中数据源的索引,如果在收集中不存在数据源,则使用 -1 .
如果此对象被销毁, 返回真实; 否则, 错误 .
If this object was destroyed, it should not be used; calling any function other than
isDestroyed will result in a DeveloperError exception.
Returns:
如果此对象已被销毁, 则属真; 否则, 属假 .
将数据源降低到收集中的一个位置.
| Name | Type | Description |
|---|---|---|
dataSource |
DataSource | 要移动的数据源 . |
Throws:
-
DeveloperError : dataSource is not in this collection.
-
DeveloperError : This object was destroyed, i.e., destroy() was called.
将数据源降低到收藏的底部.
| Name | Type | Description |
|---|---|---|
dataSource |
DataSource | 要移动的数据源 . |
Throws:
-
DeveloperError : dataSource is not in this collection.
-
DeveloperError : This object was destroyed, i.e., destroy() was called.
将数据源提升到收集中的一个位置.
| Name | Type | Description |
|---|---|---|
dataSource |
DataSource | 要移动的数据源 . |
Throws:
-
DeveloperError : dataSource is not in this collection.
-
DeveloperError : This object was destroyed, i.e., destroy() was called.
将数据源提升到收藏的顶端.
| Name | Type | Description |
|---|---|---|
dataSource |
DataSource | 要移动的数据源 . |
Throws:
-
DeveloperError : dataSource is not in this collection.
-
DeveloperError : This object was destroyed, i.e., destroy() was called.
如果存在,则从此收藏中删除数据源.
| Name | Type | Default | Description |
|---|---|---|---|
dataSource |
DataSource | 要删除的数据源 . | |
destroy |
boolean |
false
|
optional Whether to destroy the data source in addition to removing it. |
Returns:
如果数据来源在收集中并被删除,则真实性为真,
如果数据源不在收集中,则不真实.
从此收藏中删除所有数据源.
| Name | Type | Default | Description |
|---|---|---|---|
destroy |
boolean |
false
|
optional |