public final class Time extends Coordinates<TemporalCRS<?>> implements Measurable<Duration>
temporal UTC time coordinates.| Modifier and Type | Field and Description |
|---|---|
static TemporalCRS<Time> |
CRS
Holds the coordinate reference system for all instances of this class.
|
| Constructor and Description |
|---|
Time(double value,
Unit<Duration> unit)
Creates the temporal position corresponding to the specified coordinates.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Measurable<Duration> arg0) |
Time |
copy()
Returns a copy of these coordinates
allocated
by the calling thread (possibly on the stack). |
double |
doubleValue(Unit<Duration> unit)
Returns the value of this measurable stated in the specified unit as
a
double. |
TemporalCRS<?> |
getCoordinateReferenceSystem()
Returns the reference system for this coordinates.
|
int |
getDimension()
OpenGIS® - The length of coordinate sequence (the number of entries).
|
double |
getOrdinate(int dimension)
OpenGIS® - Returns the ordinate at the specified dimension.
|
long |
longValue(Unit<Duration> unit)
Returns the estimated integral value of this measurable stated in
the specified unit as a
long. |
static Time |
valueOf(Date date)
Returns the temporal position corresponding to the specified date.
|
static Time |
valueOf(double value,
Unit<Duration> unit)
Returns the temporal position corresponding to the specified coordinates.
|
clone, getCoordinates, getPosition, setOrdinate, toString, toTextpublic static final TemporalCRS<Time> CRS
public static Time valueOf(double value, Unit<Duration> unit)
value - the time since midnight, January 1, 1970 UTC stated in the
specified unit.unit - the duration unit in which the time value is stated.public static Time valueOf(Date date)
date - the date.public TemporalCRS<?> getCoordinateReferenceSystem()
CoordinatesgetCoordinateReferenceSystem in interface org.opengis.spatialschema.geometry.DirectPositiongetCoordinateReferenceSystem in class Coordinates<TemporalCRS<?>>public int getDimension()
CoordinatesgetDimension in interface org.opengis.spatialschema.geometry.DirectPositiongetDimension in class Coordinates<TemporalCRS<?>>public double getOrdinate(int dimension)
throws IndexOutOfBoundsException
CoordinatesgetOrdinate in interface org.opengis.spatialschema.geometry.DirectPositiongetOrdinate in class Coordinates<TemporalCRS<?>>dimension - The dimension in the range 0 to
dimension-1.IndexOutOfBoundsException - if the specified dimension is out
of bounds.public final double doubleValue(Unit<Duration> unit)
Measurabledouble. If the measurable has too great a magnitude to
be represented as a double, it will be converted to
Double.NEGATIVE_INFINITY or
Double.POSITIVE_INFINITY as appropriate.doubleValue in interface Measurable<Duration>unit - the unit in which this measurable value is stated.double.public final long longValue(Unit<Duration> unit)
Measurablelong.
Note: This method differs from the Number.longValue()
in the sense that the closest integer value is returned
and an ArithmeticException is raised instead
of a bit truncation in case of overflow (safety critical).
longValue in interface Measurable<Duration>unit - the unit in which the measurable value is stated.long.public int compareTo(Measurable<Duration> arg0)
compareTo in interface Comparable<Measurable<Duration>>public Time copy()
Coordinatesallocated
by the calling thread (possibly on the stack).copy in interface javolution.lang.ValueTypecopy in class Coordinates<TemporalCRS<?>>