OSFI-Java
3.10.1
OpenSF Integration Library
|
Public Member Functions | |
TimeValue (final int year, final int month, final int dom, final int hour, final int minute, final int sec, final int nanosec) | |
String | toString () |
int | compareTo (final TimeValue o) |
boolean | equals (final Object other) |
int | hashCode () |
Static Public Member Functions | |
static TimeValue | parse (final String s) |
Public Attributes | |
final short | year |
final byte | month |
final byte | dom |
final byte | hour |
final byte | minute |
final byte | sec |
final int | nanosec |
Class that represents the parsed value of a TIME-formatted parameter. The values stored are interpreted as a proleptic Gregorian date between {@literal 0001-01-01T00:00:00Z} and {@literal 9999-12:31T23:59:60.999999999Z}. The range of the fields is checked on construction, but the validity of a leap-second is not.
esa.opensf.osfi.TimeValue.TimeValue | ( | final int | year, |
final int | month, | ||
final int | dom, | ||
final int | hour, | ||
final int | minute, | ||
final int | sec, | ||
final int | nanosec | ||
) |
Create an instance representing the given point in time. This constructor uses int arguments so that it can be called with literal values. However, the provided values are range-checked, and the constructor throws if any values are out of the ranges indicated below. Caveats:
year | Year number, from 1 to 9999 inclusive. |
month | Month number, from 1 to 12. |
dom | Day of month, from 1 to the appropriate length according to the year. |
hour | Hour of day, from 0 to 23. |
minute | Minute of hour, from 0 to 59. |
sec | Second of minute, from 0 to 60 to allow for leap seconds. |
nanosec | Fraction of second in ns resolution, from 0 to 999_999_999. |
IllegalArgumentException | If a value is out of range. |
References esa.opensf.osfi.TimeValue.dom, esa.opensf.osfi.TimeValue.hour, esa.opensf.osfi.TimeValue.minute, esa.opensf.osfi.TimeValue.month, esa.opensf.osfi.TimeValue.nanosec, esa.opensf.osfi.TimeValue.sec, and esa.opensf.osfi.TimeValue.year.
int esa.opensf.osfi.TimeValue.compareTo | ( | final TimeValue | o | ) |
Values are compared field by field from most to least significant. No adaptations are performed, so month=3 and dom=31 is less-than month=4 and dom=0.
References esa.opensf.osfi.TimeValue.dom, esa.opensf.osfi.TimeValue.hour, esa.opensf.osfi.TimeValue.minute, esa.opensf.osfi.TimeValue.month, esa.opensf.osfi.TimeValue.nanosec, esa.opensf.osfi.TimeValue.sec, and esa.opensf.osfi.TimeValue.year.
boolean esa.opensf.osfi.TimeValue.equals | ( | final Object | other | ) |
Returns
if the
object compares equal to
, that is, if it is also of type
and all its fields match those of
.
Two instances are equal if all their field values are exactly equal. No conversions or adaptations are performed so month=4 and dom=0 is different from month=3 and dom=31.
References esa.opensf.osfi.TimeValue.dom, esa.opensf.osfi.TimeValue.hour, esa.opensf.osfi.TimeValue.minute, esa.opensf.osfi.TimeValue.month, esa.opensf.osfi.TimeValue.nanosec, esa.opensf.osfi.TimeValue.sec, esa.opensf.osfi.TimeValue.TimeValue(), and esa.opensf.osfi.TimeValue.year.
int esa.opensf.osfi.TimeValue.hashCode | ( | ) |
Returns a hash code composed of all the fields in the instance.
|
static |
Parse the value of (a single element of) a TIME parameter, which must be in CCSDS ASCII calendar segmented time code format.
s | String value |
IllegalArgumentException | If the string has an unsupported format. |
References esa.opensf.osfi.TimeValue.dom, esa.opensf.osfi.TimeValue.hour, esa.opensf.osfi.TimeValue.month, esa.opensf.osfi.TimeValue.sec, esa.opensf.osfi.TimeValue.TimeValue(), and esa.opensf.osfi.TimeValue.year.
String esa.opensf.osfi.TimeValue.toString | ( | ) |
References esa.opensf.osfi.TimeValue.dom, esa.opensf.osfi.TimeValue.hour, esa.opensf.osfi.TimeValue.minute, esa.opensf.osfi.TimeValue.month, esa.opensf.osfi.TimeValue.nanosec, esa.opensf.osfi.TimeValue.sec, and esa.opensf.osfi.TimeValue.year.
final byte esa.opensf.osfi.TimeValue.dom |
Day of month, 1 to 28/29/30/31 depending on the month/year combination.
final byte esa.opensf.osfi.TimeValue.hour |
Hour, 0 to 23.
final byte esa.opensf.osfi.TimeValue.minute |
Minute, 0 to 59.
final byte esa.opensf.osfi.TimeValue.month |
Month, 1 to 12.
final int esa.opensf.osfi.TimeValue.nanosec |
Fraction of the second in nanosecond precision, 0 to 999_999_999.
final byte esa.opensf.osfi.TimeValue.sec |
Second, 0 to 60 (to allow for leap seconds, which are not verified).
final short esa.opensf.osfi.TimeValue.year |
Year number, 1 to 9999.