| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
intervals |
Array.<TimeInterval> | 可选 optional 要添加到集合中的间隔数组。 An array of intervals to add to the collection. |
成员 Members
readonly changedEvent : Event
获取每当间隔集合发生更改时引发的事件。 Gets an event that is raised whenever the collection of intervals change.
获取集合是否为空。 Gets whether or not the collection is empty.
获取开始时间是否包含在集合中。 Gets whether or not the start time is included in the collection.
获取停止时间是否包含在集合中。 Gets whether or not the stop time is included in the collection.
获取集合中的间隔数。 Gets the number of intervals in the collection.
readonly start : JulianDate
获取集合的开始时间。 Gets the start time of the collection.
readonly stop : JulianDate
获取集合的停止时间。 Gets the stop time of the collection.
方法 Methods
static Cesium.TimeIntervalCollection.fromIso8601(options, result) → TimeIntervalCollection
从创建一个新实例 Creates a new instance from an ISO 8601 时间间隔(开始/结束/持续时间)。 time interval (start/end/duration).
| 名称 Name | 类型 Type | 说明 Description | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
具有以下属性的对象: Object with the following properties:
|
||||||||||||||||||||||||||||
result |
TimeIntervalCollection | 可选 optional 用于结果的现有实例。 An existing instance to use for the result. |
返回: Returns:
修改后的结果参数或新实例(如果未提供)。 The modified result parameter or a new instance if none was provided.
static Cesium.TimeIntervalCollection.fromIso8601DateArray(options, result) → TimeIntervalCollection
| 名称 Name | 类型 Type | 说明 Description | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
具有以下属性的对象: Object with the following properties:
|
||||||||||||||||||||||||||||
result |
TimeIntervalCollection | 可选 optional 用于结果的现有实例。 An existing instance to use for the result. |
返回: Returns:
修改后的结果参数或新实例(如果未提供)。 The modified result parameter or a new instance if none was provided.
static Cesium.TimeIntervalCollection.fromIso8601DurationArray(options, result) → TimeIntervalCollection
| 名称 Name | 类型 Type | 说明 Description | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
具有以下属性的对象: Object with the following properties:
|
||||||||||||||||||||||||||||||||||||
result |
TimeIntervalCollection | 可选 optional 用于结果的现有实例。 An existing instance to use for the result. |
返回: Returns:
修改后的结果参数或新实例(如果未提供)。 The modified result parameter or a new instance if none was provided.
static Cesium.TimeIntervalCollection.fromJulianDateArray(options, result) → TimeIntervalCollection
从 JulianDate 数组创建一个新实例。 Creates a new instance from a JulianDate array.
| 名称 Name | 类型 Type | 说明 Description | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
具有以下属性的对象: Object with the following properties:
|
||||||||||||||||||||||||||||
result |
TimeIntervalCollection | 可选 optional 用于结果的现有实例。 An existing instance to use for the result. |
返回: Returns:
修改后的结果参数或新实例(如果未提供)。 The modified result parameter or a new instance if none was provided.
将间隔添加到集合中,合并包含相同数据的间隔并根据需要分割不同数据的间隔,以维护不重叠的集合。新间隔中的数据优先于集合中的任何现有间隔。 Adds an interval to the collection, merging intervals that contain the same data and splitting intervals of different data as needed in order to maintain a non-overlapping collection. The data in the new interval takes precedence over any existing intervals in the collection.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
interval |
TimeInterval | 要添加的间隔。 The interval to add. |
dataComparer |
TimeInterval.DataComparer | 可选 optional 比较两个间隔的数据的函数。如果省略,则使用引用相等。 A function which compares the data of the two intervals. If omitted, reference equality is used. |
检查指定的日期是否在此集合内。 Checks if the specified date is inside this collection.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
julianDate |
JulianDate | 要检查的日期。 The date to check. |
返回: Returns:
true 如果集合包含指定日期, if the collection contains the specified date, false otherwise.
将此实例与提供的实例按组件进行比较并返回 Compares this instance against the provided instance componentwise and returns
true 如果它们相等, if they are equal, false otherwise.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
right |
TimeIntervalCollection | 可选 optional 右侧集合。 The right hand side collection. |
dataComparer |
TimeInterval.DataComparer | 可选 optional 比较两个间隔的数据的函数。如果省略,则使用引用相等。 A function which compares the data of the two intervals. If omitted, reference equality is used. |
返回: Returns:
true 如果它们相等, if they are equal, false otherwise.
查找并返回包含指定日期的时间间隔的数据。 Finds and returns the data for the interval that contains the specified date.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
date |
JulianDate | 要搜索的日期。 The date to search for. |
返回: Returns:
包含指定日期的时间间隔的数据,或 The data for the interval containing the specified date, or
undefined 如果不存在这样的区间。 if no such interval exists.
findInterval(options) → TimeInterval|undefined
返回集合中与指定参数匹配的第一个间隔。所有参数都是可选的并且 Returns the first interval in the collection that matches the specified parameters. All parameters are optional and
undefined 参数被视为无关条件。 parameters are treated as a don't care condition.
| 名称 Name | 类型 Type | 说明 Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
可选 optional
具有以下属性的对象: Object with the following properties:
|
返回: Returns:
集合中与指定参数匹配的第一个间隔。 The first interval in the collection that matches the specified parameters.
findIntervalContainingDate(date) → TimeInterval|undefined
查找并返回包含指定日期的时间间隔。 Finds and returns the interval that contains the specified date.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
date |
JulianDate | 要搜索的日期。 The date to search for. |
返回: Returns:
包含指定日期的间隔, The interval containing the specified date,
undefined 如果不存在这样的区间。 if no such interval exists.
get(index) → TimeInterval|undefined
获取指定索引处的间隔。 Gets the interval at the specified index.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
index |
number | 要检索的间隔的索引。 The index of the interval to retrieve. |
返回: Returns:
指定索引处的间隔,或 The interval at the specified index, or
undefined 如果不存在作为该索引的区间。 if no interval exists as that index.
查找并返回集合中包含指定日期的时间间隔的索引。 Finds and returns the index of the interval in the collection that contains the specified date.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
date |
JulianDate | 要搜索的日期。 The date to search for. |
返回: Returns:
包含指定日期的区间的索引,如果不存在这样的区间,则返回一个负数,该负数是该日期之后开始的下一个区间的索引的按位补码,或者如果指定日期之后没有开始的区间,则返回集合长度的按位补码。 The index of the interval that contains the specified date, if no such interval exists, it returns a negative number which is the bitwise complement of the index of the next interval that starts after the date, or if no interval starts after the specified date, the bitwise complement of the length of the collection.
intersect(other, dataComparer, mergeCallback) → TimeIntervalCollection
创建一个新实例,该实例是该集合与提供的集合的交集。 Creates a new instance that is the intersection of this collection and the provided collection.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
other |
TimeIntervalCollection | 要相交的集合。 The collection to intersect with. |
dataComparer |
TimeInterval.DataComparer | 可选 optional 比较两个间隔的数据的函数。如果省略,则使用引用相等。 A function which compares the data of the two intervals. If omitted, reference equality is used. |
mergeCallback |
TimeInterval.MergeCallback | 可选 optional 合并两个区间数据的函数。如果省略,将使用左侧间隔的数据。 A function which merges the data of the two intervals. If omitted, the data from the left interval will be used. |
返回: Returns:
一个新的 TimeIntervalCollection,它是该集合与提供的集合的交集。 A new TimeIntervalCollection which is the intersection of this collection and the provided collection.
从集合中删除所有间隔。 Removes all intervals from the collection.
从此间隔集合中删除指定间隔,从而在指定间隔上创建一个洞。输入间隔的数据属性被忽略。 Removes the specified interval from this interval collection, creating a hole over the specified interval. The data property of the input interval is ignored.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
interval |
TimeInterval | 要删除的间隔。 The interval to remove. |
返回: Returns:
true 如果删除间隔, if the interval was removed, false 如果集合中没有间隔的任何部分。 if no part of the interval was in the collection.
