@JsType(isNative=true, namespace="Cesium", name="TimeInterval") public class TimeInterval extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
TimeInterval.DataComparer
Function interface for comparing interval data.
|
static interface |
TimeInterval.MergeCallback
Function interface for merging interval data.
|
Modifier and Type | Field and Description |
---|---|
Object |
data
Gets or sets the data associated with this interval.
|
boolean |
isStartIncluded
Gets or sets whether or not the start time is included in this interval.
|
boolean |
isStopIncluded
Gets or sets whether or not the stop time is included in this interval.
|
JulianDate |
start
Gets or sets the start time of this interval.
|
JulianDate |
stop
Gets or sets the stop time of this interval.
|
Constructor and Description |
---|
TimeInterval()
An interval defined by a start and a stop time; optionally including those times as part of the interval.
|
TimeInterval(TimeIntervalOptions options)
An interval defined by a start and a stop time; optionally including those times as part of the interval.
|
Modifier and Type | Method and Description |
---|---|
TimeInterval |
clone()
Duplicates this instance.
|
static TimeInterval |
clone(TimeInterval timeInterval,
TimeInterval result)
Duplicates the provided instance.
|
static boolean |
contains(TimeInterval timeInterval,
JulianDate julianDate)
Checks if the specified date is inside the provided interval.
|
static TimeInterval |
create(JulianDate start,
JulianDate stop) |
TimeInterval |
EMPTY()
An immutable empty interval.
|
boolean |
equals(TimeInterval right)
Compares this instance against the provided instance componentwise and returns true if they are equal, false otherwise.
|
boolean |
equals(TimeInterval right,
TimeInterval.DataComparer dataComparer)
Compares this instance against the provided instance componentwise and returns true if they are equal, false otherwise.
|
static boolean |
equals(TimeInterval left,
TimeInterval right)
Compares two instances and returns true if they are equal, false otherwise.
|
static boolean |
equals(TimeInterval left,
TimeInterval right,
TimeInterval.DataComparer dataComparer)
Compares two instances and returns true if they are equal, false otherwise.
|
boolean |
equalsEpsilon(TimeInterval right,
double epsilon)
Compares this instance against the provided instance componentwise and returns true if they are within the provided epsilon, false otherwise.
|
boolean |
equalsEpsilon(TimeInterval right,
double epsilon,
TimeInterval.DataComparer dataComparer)
Compares this instance against the provided instance componentwise and returns true if they are within the provided epsilon, false otherwise.
|
static boolean |
equalsEpsilon(TimeInterval left,
TimeInterval right,
double epsilon)
Compares two instances and returns true if they are within epsilon seconds of each other.
|
static boolean |
equalsEpsilon(TimeInterval left,
TimeInterval right,
double epsilon,
TimeInterval.DataComparer dataComparer)
Compares two instances and returns true if they are within epsilon seconds of each other.
|
static TimeInterval |
fromIso8601(TimeIntervalIso8601Options options)
Creates a new instance from an ISO 8601 interval.
|
static TimeInterval |
fromIso8601(TimeIntervalIso8601Options options,
TimeInterval result)
Creates a new instance from an ISO 8601 interval.
|
static TimeInterval |
intersect(TimeInterval left,
TimeInterval right,
TimeInterval result) |
static TimeInterval |
intersect(TimeInterval left,
TimeInterval right,
TimeInterval result,
TimeInterval.MergeCallback mergeCallback) |
boolean |
isEmpty()
Gets whether or not this interval is empty.
|
static String |
toIso8601(TimeInterval timeInterval)
Creates an ISO8601 representation of the provided interval.
|
static String |
toIso8601(TimeInterval timeInterval,
double precision)
Creates an ISO8601 representation of the provided interval.
|
String |
toString()
Creates a string representing this TimeInterval in ISO8601 format.
|
@JsProperty public Object data
@JsProperty public boolean isStartIncluded
@JsProperty public boolean isStopIncluded
@JsProperty public JulianDate start
@JsProperty public JulianDate stop
@JsConstructor public TimeInterval()
TimeIntervalCollection
.@JsConstructor public TimeInterval(TimeIntervalOptions options)
TimeIntervalCollection
.options
- Options@JsProperty(name="EMPTY") public TimeInterval EMPTY()
@JsProperty(name="isEmpty") public boolean isEmpty()
@JsOverlay public static TimeInterval create(JulianDate start, JulianDate stop)
@JsMethod public static TimeInterval clone(TimeInterval timeInterval, TimeInterval result)
timeInterval
- The instance to clone.result
- An existing instance to use for the result.@JsMethod public static boolean contains(TimeInterval timeInterval, JulianDate julianDate)
timeInterval
- The interval.julianDate
- The date to check.@JsMethod public static boolean equals(TimeInterval left, TimeInterval right)
left
- The first instance.right
- The second instance.@JsMethod public static boolean equals(TimeInterval left, TimeInterval right, TimeInterval.DataComparer dataComparer)
left
- The first instance.right
- The second instance.dataComparer
- A function which compares the data of the two intervals. If omitted, reference equality is used.@JsMethod public static boolean equalsEpsilon(TimeInterval left, TimeInterval right, double epsilon)
left
- The first instance.right
- The second instance.epsilon
- The maximum number of seconds that should separate the two instances.@JsMethod public static boolean equalsEpsilon(TimeInterval left, TimeInterval right, double epsilon, TimeInterval.DataComparer dataComparer)
left
- The first instance.right
- The second instance.epsilon
- The maximum number of seconds that should separate the two instances.dataComparer
- A function which compares the data of the two intervals. If omitted, reference equality is used.@JsMethod public static TimeInterval fromIso8601(TimeIntervalIso8601Options options)
options
- Options.@JsMethod public static TimeInterval fromIso8601(TimeIntervalIso8601Options options, TimeInterval result)
options
- Options.result
- An existing instance to use for the result.@JsMethod public static TimeInterval intersect(TimeInterval left, TimeInterval right, TimeInterval result)
left
- The first interval.right
- The second interval.result
- An existing instance to use for the result.@JsMethod public static TimeInterval intersect(TimeInterval left, TimeInterval right, TimeInterval result, TimeInterval.MergeCallback mergeCallback)
left
- The first interval.right
- The second interval.result
- An existing instance to use for the result.mergeCallback
- A function which merges the data of the two intervals. If omitted, the data from the left interval will be used.@JsMethod public static String toIso8601(TimeInterval timeInterval)
timeInterval
- The interval to be converted.@JsMethod public static String toIso8601(TimeInterval timeInterval, double precision)
timeInterval
- The interval to be converted.precision
- The number of fractional digits used to represent the seconds component. By default, the most precise representation is used.@JsMethod public TimeInterval clone()
@JsMethod public boolean equals(TimeInterval right)
right
- The right hand side interval.@JsMethod public boolean equals(TimeInterval right, TimeInterval.DataComparer dataComparer)
right
- The right hand side interval.dataComparer
- A function which compares the data of the two intervals. If omitted, reference equality is used.@JsMethod public boolean equalsEpsilon(TimeInterval right, double epsilon)
right
- The right hand side interval.epsilon
- The epsilon to use for equality testing.@JsMethod public boolean equalsEpsilon(TimeInterval right, double epsilon, TimeInterval.DataComparer dataComparer)
right
- The right hand side interval.epsilon
- The epsilon to use for equality testing.dataComparer
- A function which compares the data of the two intervals. If omitted, reference equality is used.Copyright © 2019. All rights reserved.