qd-changjing/public/static/Build/Documentation/TimeIntervalCollection.html

4065 lines
105 KiB
HTML
Raw Normal View History

2022-07-05 16:56:29 +08:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>TimeIntervalCollection - Cesium Documentation</title>
<!--[if lt IE 9]>
<script src="javascript/html5.js"></script>
<![endif]-->
<link href="styles/jsdoc-default.css" rel="stylesheet">
<link href="styles/prism.css" rel="stylesheet">
</head>
<body>
<div id="main">
<h1 class="page-title">
<a href="index.html"><img src="Images/CesiumLogo.png" class="cesiumLogo"></a>
TimeIntervalCollection
<div class="titleCenterer"></div>
</h1>
<section>
<header>
</header>
<article>
<div class="container-overview">
<div class="nameContainer">
<h4 class="name" id="TimeIntervalCollection">
<a href="#TimeIntervalCollection" class="doc-link"></a>
new Cesium.TimeIntervalCollection<span class="signature">(<span class="optional">intervals</span>)</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/TimeIntervalCollection.js#L23">Core/TimeIntervalCollection.js 23</a>
</div>
</h4>
</div>
<div class="description">
A non-overlapping collection of <a href="TimeInterval.html"><code>TimeInterval</code></a> instances sorted by start time.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>intervals</code></td>
<td class="type">
<span class="param-type">Array.&lt;<a href="TimeInterval.html">TimeInterval</a>></span>
</td>
<td class="description last">
<span class="optional">optional</span>
An array of intervals to add to the collection.</td>
</tr>
</tbody>
</table>
<dl class="details">
</dl>
</div>
<h3 class="subsection-title">Members</h3>
<div class="nameContainer">
<h4 class="name" id="changedEvent">
<a href="#changedEvent" class="doc-link"></a>
<span class="type-signature attribute-readonly">readonly</span> changedEvent<span class="type-signature"> : <a href="Event.html">Event</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/TimeIntervalCollection.js#L42">Core/TimeIntervalCollection.js 42</a>
</div>
</h4>
</div>
<div class="description">
Gets an event that is raised whenever the collection of intervals change.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="isEmpty">
<a href="#isEmpty" class="doc-link"></a>
<span class="type-signature attribute-readonly">readonly</span> isEmpty<span class="type-signature"> : Boolean</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/TimeIntervalCollection.js#L120">Core/TimeIntervalCollection.js 120</a>
</div>
</h4>
</div>
<div class="description">
Gets whether or not the collection is empty.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="isStartIncluded">
<a href="#isStartIncluded" class="doc-link"></a>
<span class="type-signature attribute-readonly">readonly</span> isStartIncluded<span class="type-signature"> : Boolean</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/TimeIntervalCollection.js#L67">Core/TimeIntervalCollection.js 67</a>
</div>
</h4>
</div>
<div class="description">
Gets whether or not the start time is included in the collection.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="isStopIncluded">
<a href="#isStopIncluded" class="doc-link"></a>
<span class="type-signature attribute-readonly">readonly</span> isStopIncluded<span class="type-signature"> : Boolean</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/TimeIntervalCollection.js#L94">Core/TimeIntervalCollection.js 94</a>
</div>
</h4>
</div>
<div class="description">
Gets whether or not the stop time is included in the collection.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="length">
<a href="#length" class="doc-link"></a>
<span class="type-signature attribute-readonly">readonly</span> length<span class="type-signature"> : Number</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/TimeIntervalCollection.js#L108">Core/TimeIntervalCollection.js 108</a>
</div>
</h4>
</div>
<div class="description">
Gets the number of intervals in the collection.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="start">
<a href="#start" class="doc-link"></a>
<span class="type-signature attribute-readonly">readonly</span> start<span class="type-signature"> : <a href="JulianDate.html">JulianDate</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/TimeIntervalCollection.js#L54">Core/TimeIntervalCollection.js 54</a>
</div>
</h4>
</div>
<div class="description">
Gets the start time of the collection.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="stop">
<a href="#stop" class="doc-link"></a>
<span class="type-signature attribute-readonly">readonly</span> stop<span class="type-signature"> : <a href="JulianDate.html">JulianDate</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/TimeIntervalCollection.js#L80">Core/TimeIntervalCollection.js 80</a>
</div>
</h4>
</div>
<div class="description">
Gets the stop time of the collection.
</div>
<dl class="details">
</dl>
<h3 class="subsection-title">Methods</h3>
<div class="nameContainer">
<h4 class="name" id=".fromIso8601">
<a href="#.fromIso8601" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.TimeIntervalCollection.fromIso8601<span class="signature">(options, <span class="optional">result</span>)</span> &rarr; <span class="type-signature returnType"><a href="TimeIntervalCollection.html">TimeIntervalCollection</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/TimeIntervalCollection.js#L994">Core/TimeIntervalCollection.js 994</a>
</div>
</h4>
</div>
<div class="description">
Creates a new instance from an <a href="http://en.wikipedia.org/wiki/ISO_8601">ISO 8601</a> time interval (start/end/duration).
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>options</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">
Object with the following properties:
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>iso8601</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="default">
</td>
<td class="description last">
An ISO 8601 interval.</td>
</tr>
<tr>
<td class="name"><code>isStartIncluded</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="default">
<code class="language-javascript">true</code>
</td>
<td class="description last">
<span class="optional">optional</span>
<code>true</code> if start time is included in the interval, <code>false</code> otherwise.</td>
</tr>
<tr>
<td class="name"><code>isStopIncluded</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="default">
<code class="language-javascript">true</code>
</td>
<td class="description last">
<span class="optional">optional</span>
<code>true</code> if stop time is included in the interval, <code>false</code> otherwise.</td>
</tr>
<tr>
<td class="name"><code>leadingInterval</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="default">
<code class="language-javascript">false</code>
</td>
<td class="description last">
<span class="optional">optional</span>
<code>true</code> if you want to add a interval from Iso8601.MINIMUM_VALUE to start time, <code>false</code> otherwise.</td>
</tr>
<tr>
<td class="name"><code>trailingInterval</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="default">
<code class="language-javascript">false</code>
</td>
<td class="description last">
<span class="optional">optional</span>
<code>true</code> if you want to add a interval from stop time to Iso8601.MAXIMUM_VALUE, <code>false</code> otherwise.</td>
</tr>
<tr>
<td class="name"><code>dataCallback</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="default">
</td>
<td class="description last">
<span class="optional">optional</span>
A function that will be return the data that is called with each interval before it is added to the collection. If unspecified, the data will be the index in the collection.</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="TimeIntervalCollection.html">TimeIntervalCollection</a></span>
</td>
<td class="description last">
<span class="optional">optional</span>
An existing instance to use for the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter or a new instance if none was provided.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".fromIso8601DateArray">
<a href="#.fromIso8601DateArray" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.TimeIntervalCollection.fromIso8601DateArray<span class="signature">(options, <span class="optional">result</span>)</span> &rarr; <span class="type-signature returnType"><a href="TimeIntervalCollection.html">TimeIntervalCollection</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/TimeIntervalCollection.js#L1051">Core/TimeIntervalCollection.js 1051</a>
</div>
</h4>
</div>
<div class="description">
Creates a new instance from a <a href="http://en.wikipedia.org/wiki/ISO_8601">ISO 8601</a> date array.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>options</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">
Object with the following properties:
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>iso8601Dates</code></td>
<td class="type">
<span class="param-type">Array.&lt;String></span>
</td>
<td class="default">
</td>
<td class="description last">
An array of ISO 8601 dates.</td>
</tr>
<tr>
<td class="name"><code>isStartIncluded</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="default">
<code class="language-javascript">true</code>
</td>
<td class="description last">
<span class="optional">optional</span>
<code>true</code> if start time is included in the interval, <code>false</code> otherwise.</td>
</tr>
<tr>
<td class="name"><code>isStopIncluded</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="default">
<code class="language-javascript">true</code>
</td>
<td class="description last">
<span class="optional">optional</span>
<code>true</code> if stop time is included in the interval, <code>false</code> otherwise.</td>
</tr>
<tr>
<td class="name"><code>leadingInterval</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="default">
<code class="language-javascript">false</code>
</td>
<td class="description last">
<span class="optional">optional</span>
<code>true</code> if you want to add a interval from Iso8601.MINIMUM_VALUE to start time, <code>false</code> otherwise.</td>
</tr>
<tr>
<td class="name"><code>trailingInterval</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="default">
<code class="language-javascript">false</code>
</td>
<td class="description last">
<span class="optional">optional</span>
<code>true</code> if you want to add a interval from stop time to Iso8601.MAXIMUM_VALUE, <code>false</code> otherwise.</td>
</tr>
<tr>
<td class="name"><code>dataCallback</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="default">
</td>
<td class="description last">
<span class="optional">optional</span>
A function that will be return the data that is called with each interval before it is added to the collection. If unspecified, the data will be the index in the collection.</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="TimeIntervalCollection.html">TimeIntervalCollection</a></span>
</td>
<td class="description last">
<span class="optional">optional</span>
An existing instance to use for the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter or a new instance if none was provided.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".fromIso8601DurationArray">
<a href="#.fromIso8601DurationArray" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.TimeIntervalCollection.fromIso8601DurationArray<span class="signature">(options, <span class="optional">result</span>)</span> &rarr; <span class="type-signature returnType"><a href="TimeIntervalCollection.html">TimeIntervalCollection</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/TimeIntervalCollection.js#L1091">Core/TimeIntervalCollection.js 1091</a>
</div>
</h4>
</div>
<div class="description">
Creates a new instance from a <a href="http://en.wikipedia.org/wiki/ISO_8601">ISO 8601</a> duration array.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>options</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">
Object with the following properties:
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>epoch</code></td>
<td class="type">
<span class="param-type"><a href="JulianDate.html">JulianDate</a></span>
</td>
<td class="default">
</td>
<td class="description last">
An date that the durations are relative to.</td>
</tr>
<tr>
<td class="name"><code>iso8601Durations</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="default">
</td>
<td class="description last">
An array of ISO 8601 durations.</td>
</tr>
<tr>
<td class="name"><code>relativeToPrevious</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="default">
<code class="language-javascript">false</code>
</td>
<td class="description last">
<span class="optional">optional</span>
<code>true</code> if durations are relative to previous date, <code>false</code> if always relative to the epoch.</td>
</tr>
<tr>
<td class="name"><code>isStartIncluded</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="default">
<code class="language-javascript">true</code>
</td>
<td class="description last">
<span class="optional">optional</span>
<code>true</code> if start time is included in the interval, <code>false</code> otherwise.</td>
</tr>
<tr>
<td class="name"><code>isStopIncluded</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="default">
<code class="language-javascript">true</code>
</td>
<td class="description last">
<span class="optional">optional</span>
<code>true</code> if stop time is included in the interval, <code>false</code> otherwise.</td>
</tr>
<tr>
<td class="name"><code>leadingInterval</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="default">
<code class="language-javascript">false</code>
</td>
<td class="description last">
<span class="optional">optional</span>
<code>true</code> if you want to add a interval from Iso8601.MINIMUM_VALUE to start time, <code>false</code> otherwise.</td>
</tr>
<tr>
<td class="name"><code>trailingInterval</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="default">
<code class="language-javascript">false</code>
</td>
<td class="description last">
<span class="optional">optional</span>
<code>true</code> if you want to add a interval from stop time to Iso8601.MAXIMUM_VALUE, <code>false</code> otherwise.</td>
</tr>
<tr>
<td class="name"><code>dataCallback</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="default">
</td>
<td class="description last">
<span class="optional">optional</span>
A function that will be return the data that is called with each interval before it is added to the collection. If unspecified, the data will be the index in the collection.</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="TimeIntervalCollection.html">TimeIntervalCollection</a></span>
</td>
<td class="description last">
<span class="optional">optional</span>
An existing instance to use for the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter or a new instance if none was provided.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id=".fromJulianDateArray">
<a href="#.fromJulianDateArray" class="doc-link"></a>
<span class="type-signature attribute-static">static</span> Cesium.TimeIntervalCollection.fromJulianDateArray<span class="signature">(options, <span class="optional">result</span>)</span> &rarr; <span class="type-signature returnType"><a href="TimeIntervalCollection.html">TimeIntervalCollection</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/TimeIntervalCollection.js#L744">Core/TimeIntervalCollection.js 744</a>
</div>
</h4>
</div>
<div class="description">
Creates a new instance from a JulianDate array.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>options</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">
Object with the following properties:
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>julianDates</code></td>
<td class="type">
<span class="param-type">Array.&lt;<a href="JulianDate.html">JulianDate</a>></span>
</td>
<td class="default">
</td>
<td class="description last">
An array of ISO 8601 dates.</td>
</tr>
<tr>
<td class="name"><code>isStartIncluded</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="default">
<code class="language-javascript">true</code>
</td>
<td class="description last">
<span class="optional">optional</span>
<code>true</code> if start time is included in the interval, <code>false</code> otherwise.</td>
</tr>
<tr>
<td class="name"><code>isStopIncluded</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="default">
<code class="language-javascript">true</code>
</td>
<td class="description last">
<span class="optional">optional</span>
<code>true</code> if stop time is included in the interval, <code>false</code> otherwise.</td>
</tr>
<tr>
<td class="name"><code>leadingInterval</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="default">
<code class="language-javascript">false</code>
</td>
<td class="description last">
<span class="optional">optional</span>
<code>true</code> if you want to add a interval from Iso8601.MINIMUM_VALUE to start time, <code>false</code> otherwise.</td>
</tr>
<tr>
<td class="name"><code>trailingInterval</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="default">
<code class="language-javascript">false</code>
</td>
<td class="description last">
<span class="optional">optional</span>
<code>true</code> if you want to add a interval from stop time to Iso8601.MAXIMUM_VALUE, <code>false</code> otherwise.</td>
</tr>
<tr>
<td class="name"><code>dataCallback</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="default">
</td>
<td class="description last">
<span class="optional">optional</span>
A function that will be return the data that is called with each interval before it is added to the collection. If unspecified, the data will be the index in the collection.</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td class="name"><code>result</code></td>
<td class="type">
<span class="param-type"><a href="TimeIntervalCollection.html">TimeIntervalCollection</a></span>
</td>
<td class="description last">
<span class="optional">optional</span>
An existing instance to use for the result.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The modified result parameter or a new instance if none was provided.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="addInterval">
<a href="#addInterval" class="doc-link"></a>
addInterval<span class="signature">(interval, <span class="optional">dataComparer</span>)</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/TimeIntervalCollection.js#L310">Core/TimeIntervalCollection.js 310</a>
</div>
</h4>
</div>
<div class="description">
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.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>interval</code></td>
<td class="type">
<span class="param-type"><a href="TimeInterval.html">TimeInterval</a></span>
</td>
<td class="description last">
The interval to add.</td>
</tr>
<tr>
<td class="name"><code>dataComparer</code></td>
<td class="type">
<span class="param-type"><a href="TimeInterval.html#.DataComparer">TimeInterval.DataComparer</a></span>
</td>
<td class="description last">
<span class="optional">optional</span>
A function which compares the data of the two intervals. If omitted, reference equality is used.</td>
</tr>
</tbody>
</table>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="contains">
<a href="#contains" class="doc-link"></a>
contains<span class="signature">(julianDate)</span> &rarr; <span class="type-signature returnType">Boolean</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/TimeIntervalCollection.js#L212">Core/TimeIntervalCollection.js 212</a>
</div>
</h4>
</div>
<div class="description">
Checks if the specified date is inside this collection.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>julianDate</code></td>
<td class="type">
<span class="param-type"><a href="JulianDate.html">JulianDate</a></span>
</td>
<td class="description last">
The date to check.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
<code>true</code> if the collection contains the specified date, <code>false</code> otherwise.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="equals">
<a href="#equals" class="doc-link"></a>
equals<span class="signature">(<span class="optional">right</span>, <span class="optional">dataComparer</span>)</span> &rarr; <span class="type-signature returnType">Boolean</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/TimeIntervalCollection.js#L135">Core/TimeIntervalCollection.js 135</a>
</div>
</h4>
</div>
<div class="description">
Compares this instance against the provided instance componentwise and returns
<code>true</code> if they are equal, <code>false</code> otherwise.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>right</code></td>
<td class="type">
<span class="param-type"><a href="TimeIntervalCollection.html">TimeIntervalCollection</a></span>
</td>
<td class="description last">
<span class="optional">optional</span>
The right hand side collection.</td>
</tr>
<tr>
<td class="name"><code>dataComparer</code></td>
<td class="type">
<span class="param-type"><a href="TimeInterval.html#.DataComparer">TimeInterval.DataComparer</a></span>
</td>
<td class="description last">
<span class="optional">optional</span>
A function which compares the data of the two intervals. If omitted, reference equality is used.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
<code>true</code> if they are equal, <code>false</code> otherwise.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="findDataForIntervalContainingDate">
<a href="#findDataForIntervalContainingDate" class="doc-link"></a>
findDataForIntervalContainingDate<span class="signature">(date)</span> &rarr; <span class="type-signature returnType">Object</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/TimeIntervalCollection.js#L199">Core/TimeIntervalCollection.js 199</a>
</div>
</h4>
</div>
<div class="description">
Finds and returns the data for the interval that contains the specified date.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>date</code></td>
<td class="type">
<span class="param-type"><a href="JulianDate.html">JulianDate</a></span>
</td>
<td class="description last">
The date to search for.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The data for the interval containing the specified date, or <code>undefined</code> if no such interval exists.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="findInterval">
<a href="#findInterval" class="doc-link"></a>
findInterval<span class="signature">(<span class="optional">options</span>)</span> &rarr; <span class="type-signature returnType"><a href="TimeInterval.html">TimeInterval</a>|undefined</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/TimeIntervalCollection.js#L279">Core/TimeIntervalCollection.js 279</a>
</div>
</h4>
</div>
<div class="description">
Returns the first interval in the collection that matches the specified parameters.
All parameters are optional and <code>undefined</code> parameters are treated as a don't care condition.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>options</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">
<span class="optional">optional</span>
Object with the following properties:
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>start</code></td>
<td class="type">
<span class="param-type"><a href="JulianDate.html">JulianDate</a></span>
</td>
<td class="description last">
<span class="optional">optional</span>
The start time of the interval.</td>
</tr>
<tr>
<td class="name"><code>stop</code></td>
<td class="type">
<span class="param-type"><a href="JulianDate.html">JulianDate</a></span>
</td>
<td class="description last">
<span class="optional">optional</span>
The stop time of the interval.</td>
</tr>
<tr>
<td class="name"><code>isStartIncluded</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="description last">
<span class="optional">optional</span>
<code>true</code> if <code>options.start</code> is included in the interval, <code>false</code> otherwise.</td>
</tr>
<tr>
<td class="name"><code>isStopIncluded</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="description last">
<span class="optional">optional</span>
<code>true</code> if <code>options.stop</code> is included in the interval, <code>false</code> otherwise.</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The first interval in the collection that matches the specified parameters.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="findIntervalContainingDate">
<a href="#findIntervalContainingDate" class="doc-link"></a>
findIntervalContainingDate<span class="signature">(date)</span> &rarr; <span class="type-signature returnType"><a href="TimeInterval.html">TimeInterval</a>|undefined</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/TimeIntervalCollection.js#L188">Core/TimeIntervalCollection.js 188</a>
</div>
</h4>
</div>
<div class="description">
Finds and returns the interval that contains the specified date.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>date</code></td>
<td class="type">
<span class="param-type"><a href="JulianDate.html">JulianDate</a></span>
</td>
<td class="description last">
The date to search for.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The interval containing the specified date, <code>undefined</code> if no such interval exists.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="get">
<a href="#get" class="doc-link"></a>
get<span class="signature">(index)</span> &rarr; <span class="type-signature returnType"><a href="TimeInterval.html">TimeInterval</a>|undefined</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/TimeIntervalCollection.js#L162">Core/TimeIntervalCollection.js 162</a>
</div>
</h4>
</div>
<div class="description">
Gets the interval at the specified index.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>index</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last">
The index of the interval to retrieve.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
The interval at the specified index, or <code>undefined</code> if no interval exists as that index.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="indexOf">
<a href="#indexOf" class="doc-link"></a>
indexOf<span class="signature">(date)</span> &rarr; <span class="type-signature returnType">Number</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/TimeIntervalCollection.js#L227">Core/TimeIntervalCollection.js 227</a>
</div>
</h4>
</div>
<div class="description">
Finds and returns the index of the interval in the collection that contains the specified date.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>date</code></td>
<td class="type">
<span class="param-type"><a href="JulianDate.html">JulianDate</a></span>
</td>
<td class="description last">
The date to search for.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
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.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="intersect">
<a href="#intersect" class="doc-link"></a>
intersect<span class="signature">(other, <span class="optional">dataComparer</span>, <span class="optional">mergeCallback</span>)</span> &rarr; <span class="type-signature returnType"><a href="TimeIntervalCollection.html">TimeIntervalCollection</a></span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/TimeIntervalCollection.js#L671">Core/TimeIntervalCollection.js 671</a>
</div>
</h4>
</div>
<div class="description">
Creates a new instance that is the intersection of this collection and the provided collection.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>other</code></td>
<td class="type">
<span class="param-type"><a href="TimeIntervalCollection.html">TimeIntervalCollection</a></span>
</td>
<td class="description last">
The collection to intersect with.</td>
</tr>
<tr>
<td class="name"><code>dataComparer</code></td>
<td class="type">
<span class="param-type"><a href="TimeInterval.html#.DataComparer">TimeInterval.DataComparer</a></span>
</td>
<td class="description last">
<span class="optional">optional</span>
A function which compares the data of the two intervals. If omitted, reference equality is used.</td>
</tr>
<tr>
<td class="name"><code>mergeCallback</code></td>
<td class="type">
<span class="param-type"><a href="TimeInterval.html#.MergeCallback">TimeInterval.MergeCallback</a></span>
</td>
<td class="description last">
<span class="optional">optional</span>
A function which merges the data of the two intervals. If omitted, the data from the left interval will be used.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
A new TimeIntervalCollection which is the intersection of this collection and the provided collection.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="removeAll">
<a href="#removeAll" class="doc-link"></a>
removeAll<span class="signature">()</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/TimeIntervalCollection.js#L175">Core/TimeIntervalCollection.js 175</a>
</div>
</h4>
</div>
<div class="description">
Removes all intervals from the collection.
</div>
<dl class="details">
</dl>
<div class="nameContainer">
<h4 class="name" id="removeInterval">
<a href="#removeInterval" class="doc-link"></a>
removeInterval<span class="signature">(interval)</span> &rarr; <span class="type-signature returnType">Boolean</span>
<div class="source-link rightLinks">
<a href="https://github.com/CesiumGS/cesium/blob/1.91/Source/Core/TimeIntervalCollection.js#L510">Core/TimeIntervalCollection.js 510</a>
</div>
</h4>
</div>
<div class="description">
Removes the specified interval from this interval collection, creating a hole over the specified interval.
The data property of the input interval is ignored.
</div>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>interval</code></td>
<td class="type">
<span class="param-type"><a href="TimeInterval.html">TimeInterval</a></span>
</td>
<td class="description last">
The interval to remove.</td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="param-desc">
<code>true</code> if the interval was removed, <code>false</code> if no part of the interval was in the collection.
</div>
<dl class="details">
</dl>
</article>
</section>
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.10</a>
</footer>
</div>
<div class="nav">
<div class="menu">
<input type="text" class="classFilter" id="ClassFilter" placeholder="Search">
<ul id="ClassList"><li data-name="Animation"><a href="Animation.html">Animation</a></li><li data-name="AnimationViewModel"><a href="AnimationViewModel.html">AnimationViewModel</a></li><li data-name="Appearance"><a href="Appearance.html">Appearance</a></li><li data-name="ArcGisMapServerImageryProvider"><a href="ArcGisMapServerImageryProvider.html">ArcGisMapServerImageryProvider</a></li><li data-name="ArcGISTiledElevationTerrainProvider"><a href="ArcGISTiledElevationTerrainProvider.html">ArcGISTiledElevationTerrainProvider</a></li><li data-name="ArcType"><a href="global.html#ArcType">ArcType</a></li><li data-name="AssociativeArray"><a href="AssociativeArray.html">AssociativeArray</a></li><li data-name="Axis"><a href="global.html#Axis">Axis</a></li><li data-name="AxisAlignedBoundingBox"><a href="AxisAlignedBoundingBox.html">AxisAlignedBoundingBox</a></li><li data-name="backFaceCulling"><a href="global.html#backFaceCulling">backFaceCulling</a></li><li data-name="barycentricCoordinates"><a href="global.html#barycentricCoordinates">barycentricCoordinates</a></li><li data-name="BaseLayerPicker"><a href="BaseLayerPicker.html">BaseLayerPicker</a></li><li data-name="BaseLayerPickerViewModel"><a href="BaseLayerPickerViewModel.html">BaseLayerPickerViewModel</a></li><li data-name="Billboard"><a href="Billboard.html">Billboard</a></li><li data-name="BillboardCollection"><a href="BillboardCollection.html">BillboardCollection</a></li><li data-name="BillboardGraphics"><a href="BillboardGraphics.html">BillboardGraphics</a></li><li data-name="BillboardVisualizer"><a href="BillboardVisualizer.html">BillboardVisualizer</a></li><li data-name="binarySearch"><a href="global.html#binarySearch">binarySearch</a></li><li data-name="binarySearchComparator"><a href="global.html#binarySearchComparator">binarySearchComparator</a></li><li data-name="BingMapsGeocoderService"><a href="BingMapsGeocoderService.html">BingMapsGeocoderService</a></li><li data-name="BingMapsImageryProvider"><a href="BingMapsImageryProvider.html">BingMapsImageryProvider</a></li><li data-name="BingMapsStyle"><a href="global.html#BingMapsStyle">BingMapsStyle</a></li><li data-name="BlendEquation"><a href="global.html#BlendEquation">BlendEquation</a></li><li data-name="BlendFunction"><a href="global.html#BlendFunction">BlendFunction</a></li><li data-name="BlendingState"><a href="BlendingState.html">BlendingState</a></li><li data-name="BlendOption"><a href="global.html#BlendOption">BlendOption</a></li><li data-name="BoundingRectangle"><a href="BoundingRectangle.html">BoundingRectangle</a></li><li data-name="BoundingSphere"><a href="BoundingSphere.html">BoundingSphere</a></li><li data-name="boundingSphere"><a href="global.html#boundingSphere">boundingSphere</a></li><li data-name="BoxEmitter"><a href="BoxEmitter.html">BoxEmitter</a></li><li data-name="BoxGeometry"><a href="BoxGeometry.html">BoxGeometry</a></li><li data-name="BoxGeometryUpdater"><a href="BoxGeometryUpdater.html">BoxGeometryUpdater</a></li><li data-name="BoxGraphics"><a href="BoxGraphics.html">BoxGraphics</a></li><li data-name="BoxOutlineGeometry"><a href="BoxOutlineGeometry.html">BoxOutlineGeometry</a></li><li data-name="buildModuleUrl"><a href="global.html#buildModuleUrl">buildModuleUrl</a></li><li data-name="CallbackProperty"><a href="CallbackProperty.html">CallbackProperty</a></li><li data-name="Camera"><a href="Camera.html">Camera</a></li><li data-name="CameraEventAggregator"><a href="CameraEventAggregator.html">CameraEventAggregator</a></li><li data-name="CameraEventType"><a href="global.html#CameraEventType">CameraEventType</a></li><li data-name="cancelAnimationFrame"><a href="global.html#cancelAnimationFrame">cancelAnimationFrame</a></li><li data-name="Cartesian2"><a href="Cartesian2.html">Cartesian2</a></li><li data-name="Cartesian3"><a href="Cartesian3.html">Cartesian3</a></li><li data-name="Cartesian4"><a href="Cartesian4.html">Cartesian4</a></li><li data-name="Cartographic"><a href="Cartographic.html">Cartographic</a></li><li data-name="CartographicGeocoderService"><a href="CartographicGeocoderServic
</div>
</div>
<script>
if (window.frameElement) {
document.body.className = 'embedded';
var ele = document.createElement('a');
ele.className = 'popout';
ele.target = '_blank';
ele.href = window.location.href;
ele.title = 'Pop out';
document.getElementById('main').appendChild(ele);
}
// Set targets on external links. Sandcastle and GitHub shouldn't be embedded in any iframe.
Array.prototype.forEach.call(document.getElementsByTagName('a'), function(a) {
if (/^https?:/i.test(a.getAttribute('href'))) {
a.target='_blank';
}
});
</script>
<script src="javascript/prism.js"></script>
<script src="javascript/cesiumDoc.js"></script>
</body>
</html>