AssociativeArray

一个键值对集合,存储为哈希表以便快速查找, 同时提供数组以支持快速迭代。

new Cesium.AssociativeArray()

Members

获取集合中的项目数量。
获取集合中所有值的无序数组。 这是一个实时数组,会自动反映集合中的值, 不应直接修改。

Methods

contains(key)boolean

从集合中移除键值对。
Name Type Description
key string | number 要移除的键。
Returns:
如果已移除则返回true,如果键不在集合中则返回false。
检索与提供的键关联的值。
Name Type Description
key string | number 要检索其值的键。
Returns:
关联的值;如果键不存在于集合中则返回undefined。
确定提供的键是否存在于数组中。
Name Type Description
key string | number 要检查的键。
Returns:
如果键存在于数组中则返回true,否则返回false
清空集合。
将提供的键与提供的值关联。如果键已存在, 则使用新值覆盖。
Name Type Description
key string | number 唯一标识符。
value T 要与提供的键关联的值。
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.