Class Time
java.lang.Object
org.jscience.geography.coordinates.Coordinates<TemporalCRS<?>>
org.jscience.geography.coordinates.Time
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<Measurable<Duration>>,Measurable<Duration>,javolution.lang.Immutable,javolution.lang.Realtime,javolution.lang.ValueType,javolution.xml.XMLSerializable,org.opengis.spatialschema.geometry.DirectPosition,org.opengis.spatialschema.geometry.geometry.Position,org.opengis.util.Cloneable
This class represents the
temporal UTC time coordinates.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TemporalCRS<Time>Holds the coordinate reference system for all instances of this class. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(Measurable<Duration> arg0) copy()Returns a copy of these coordinatesallocatedby the calling thread (possibly on the stack).final doubledoubleValue(Unit<Duration> unit) Returns the value of this measurable stated in the specified unit as adouble.TemporalCRS<?>Returns the reference system for this coordinates.intOpenGIS® - The length of coordinate sequence (the number of entries).doublegetOrdinate(int dimension) OpenGIS® - Returns the ordinate at the specified dimension.final longReturns the estimated integral value of this measurable stated in the specified unit as along.static TimeReturns the temporal position corresponding to the specified coordinates.static TimeReturns the temporal position corresponding to the specified date.Methods inherited from class org.jscience.geography.coordinates.Coordinates
clone, getCoordinates, getPosition, setOrdinate, toString, toText
-
Field Details
-
CRS
Holds the coordinate reference system for all instances of this class.
-
-
Constructor Details
-
Time
Creates the temporal position corresponding to the specified coordinates.- Parameters:
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.
-
-
Method Details
-
valueOf
Returns the temporal position corresponding to the specified coordinates.- Parameters:
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.- Returns:
- the corresponding temporal position.
-
valueOf
Returns the temporal position corresponding to the specified date.- Parameters:
date- the date.- Returns:
- the corresponding temporal position.
-
getCoordinateReferenceSystem
Description copied from class:CoordinatesReturns the reference system for this coordinates.- Specified by:
getCoordinateReferenceSystemin interfaceorg.opengis.spatialschema.geometry.DirectPosition- Specified by:
getCoordinateReferenceSystemin classCoordinates<TemporalCRS<?>>- Returns:
- the associated coordinate reference system.
-
getDimension
public int getDimension()Description copied from class:CoordinatesOpenGIS® - The length of coordinate sequence (the number of entries). This is determined by the coordinate reference system.- Specified by:
getDimensionin interfaceorg.opengis.spatialschema.geometry.DirectPosition- Specified by:
getDimensionin classCoordinates<TemporalCRS<?>>- Returns:
- the dimensionality of this position.
-
getOrdinate
Description copied from class:CoordinatesOpenGIS® - Returns the ordinate at the specified dimension.- Specified by:
getOrdinatein interfaceorg.opengis.spatialschema.geometry.DirectPosition- Specified by:
getOrdinatein classCoordinates<TemporalCRS<?>>- Parameters:
dimension- The dimension in the range 0 to dimension-1.- Returns:
- The coordinate at the specified dimension.
- Throws:
IndexOutOfBoundsException- if the specified dimension is out of bounds.
-
doubleValue
Description copied from interface:MeasurableReturns the value of this measurable stated in the specified unit as adouble. If the measurable has too great a magnitude to be represented as adouble, it will be converted toDouble.NEGATIVE_INFINITYorDouble.POSITIVE_INFINITYas appropriate.- Specified by:
doubleValuein interfaceMeasurable<Duration>- Parameters:
unit- the unit in which this measurable value is stated.- Returns:
- the numeric value after conversion to type
double.
-
longValue
Description copied from interface:MeasurableReturns the estimated integral value of this measurable stated in the specified unit as along.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).- Specified by:
longValuein interfaceMeasurable<Duration>- Parameters:
unit- the unit in which the measurable value is stated.- Returns:
- the numeric value after conversion to type
long.
-
compareTo
- Specified by:
compareToin interfaceComparable<Measurable<Duration>>
-
copy
Description copied from class:CoordinatesReturns a copy of these coordinatesallocatedby the calling thread (possibly on the stack).- Specified by:
copyin interfacejavolution.lang.ValueType- Specified by:
copyin classCoordinates<TemporalCRS<?>>- Returns:
- an identical and independant copy of these coordinates .
-