public class TimeExtent extends Object
Class for storing the definition of a temporal domain. This can include a base time, time bias (deviation from base time), time step, and lead/lag time deltas.
Modifier and Type | Field and Description |
---|---|
protected boolean |
baseAtNow |
protected double |
baseTime |
protected boolean |
beginNow |
protected boolean |
endNow |
protected double |
lagTimeDelta |
protected double |
leadTimeDelta |
static double |
NOW |
static double |
NOW_ACCURACY |
protected double |
timeBias |
protected double |
timeStep |
protected int |
timeZone |
static double |
UNKNOWN |
Constructor and Description |
---|
TimeExtent() |
TimeExtent(double baseJulianTime) |
TimeExtent(double startTime,
double stopTime) |
TimeExtent(double baseJulianTime,
double timeBiasSeconds,
double timeStepSeconds,
double leadTimeDeltaSeconds,
double lagTimeDeltaSeconds) |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(double time)
Checks if this TimeExtent contains the given time
|
boolean |
contains(TimeExtent timeExtent)
Checks if this TimeExtent contains the given TimeExtent
|
TimeExtent |
copy() |
boolean |
equals(Object obj) |
boolean |
equals(TimeExtent timeExtent)
Checks if time extents are equal (no null check)
(i.e.
|
double |
getAdjustedLagTime() |
double |
getAdjustedLeadTime() |
double |
getAdjustedTime()
To get baseTime or absTime with bias applied
|
double |
getBaseTime()
To get baseTime without bias applied.
|
String |
getIsoString(int zone) |
double |
getLagTimeDelta() |
double |
getLeadTimeDelta() |
static TimeExtent |
getNowInstant() |
int |
getNumberOfSteps() |
static TimeExtent |
getPeriodEndingNow(double startTime) |
static TimeExtent |
getPeriodStartingNow(double stopTime) |
double |
getStartTime()
Helper method to get start time
|
double |
getStopTime()
Helper method to get stop time
|
double |
getTimeBias() |
double |
getTimeRange() |
double[] |
getTimes()
Calculates times based on current time settings, always assuring
that both endpoints are included even if an uneven time step occurs
at the end
|
double |
getTimeStep() |
int |
getTimeZone() |
boolean |
intersects(TimeExtent timeExtent)
Checks if this timeExtent intersects the given timeExtent
|
boolean |
isBaseAtNow() |
boolean |
isBeginNow() |
boolean |
isEndNow() |
boolean |
isNull()
Check if time is null (i.e.
|
boolean |
isTimeInstant()
Check if this is a single point in time
|
void |
nullify()
Resets all variables so that extent is null (i.e.
|
void |
resizeToContain(double t)
Resizes this extent so that it contains the given time value
|
void |
setBaseAtNow(boolean baseAtNow) |
void |
setBaseTime(double baseJulianTime) |
void |
setBeginNow(boolean beginNow) |
void |
setDeltaTimes(double leadDeltaSeconds,
double lagDeltaSeconds) |
void |
setEndNow(boolean endNow) |
void |
setLagTimeDelta(double seconds) |
void |
setLeadTimeDelta(double seconds) |
void |
setStartTime(double startTime)
Helper method to set start time
|
void |
setStopTime(double stopTime)
Helper method to set stop time
|
void |
setTimeBias(double seconds) |
void |
setTimeStep(double seconds) |
void |
setTimeZone(int timeZone) |
String |
toString() |
public static final double NOW_ACCURACY
public static final double UNKNOWN
public static final double NOW
protected double baseTime
protected double timeBias
protected double timeStep
protected double leadTimeDelta
protected double lagTimeDelta
protected boolean baseAtNow
protected boolean endNow
protected boolean beginNow
protected int timeZone
public TimeExtent()
public TimeExtent(double baseJulianTime)
public TimeExtent(double startTime, double stopTime)
public TimeExtent(double baseJulianTime, double timeBiasSeconds, double timeStepSeconds, double leadTimeDeltaSeconds, double lagTimeDeltaSeconds)
public static TimeExtent getNowInstant()
public static TimeExtent getPeriodStartingNow(double stopTime)
public static TimeExtent getPeriodEndingNow(double startTime)
public TimeExtent copy()
public void setBaseTime(double baseJulianTime)
public void setTimeBias(double seconds)
public void setTimeStep(double seconds)
public void setLeadTimeDelta(double seconds)
public void setLagTimeDelta(double seconds)
public void setDeltaTimes(double leadDeltaSeconds, double lagDeltaSeconds)
public double getBaseTime()
public double getAdjustedTime()
public double getTimeBias()
public double getTimeStep()
public double getLeadTimeDelta()
public double getLagTimeDelta()
public double getTimeRange()
public double getAdjustedLeadTime()
public double getAdjustedLagTime()
public boolean isBaseAtNow()
public void setBaseAtNow(boolean baseAtNow)
public boolean isBeginNow()
public void setBeginNow(boolean beginNow)
public boolean isEndNow()
public void setEndNow(boolean endNow)
public int getNumberOfSteps()
public double[] getTimes()
public boolean equals(TimeExtent timeExtent)
timeExtent
- public boolean contains(double time)
time
- public boolean contains(TimeExtent timeExtent)
timeExtent
- public boolean intersects(TimeExtent timeExtent)
timeExtent
- public boolean isNull()
public boolean isTimeInstant()
public void nullify()
public void resizeToContain(double t)
t
- time value (MUST be in same reference frame as the extent)public double getStartTime()
public void setStartTime(double startTime)
startTime
- start time as julian time in seconds (1970 based)public double getStopTime()
public void setStopTime(double stopTime)
stopTime
- stop time as julian time in seconds (1970 based)public String getIsoString(int zone)
public int getTimeZone()
public void setTimeZone(int timeZone)
Copyright © 2016 Sensia Software LLC. All rights reserved.