OSFI-Java  3.9.2
OpenSF Integration Library
esa.opensf.osfi.TimeValue Class Reference
Inheritance diagram for esa.opensf.osfi.TimeValue:

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
 

Detailed Description

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.

Member Function Documentation

◆ compareTo()

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.

Returns
negative value if
this
is ordered before
other
, positive value if the order is the inverse, and zero if the two values compare equal.

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.

◆ equals()

boolean esa.opensf.osfi.TimeValue.equals ( final Object  other)

Returns

true

if the

other

object compares equal to

this

, that is, if it is also of type

TimeValue

and all its fields match those of

this

.

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, and esa.opensf.osfi.TimeValue.year.

◆ hashCode()

int esa.opensf.osfi.TimeValue.hashCode ( )

Returns a hash code composed of all the fields in the instance.

◆ parse()

static TimeValue esa.opensf.osfi.TimeValue.parse ( final String  s)
static

Parse the value of (a single element of) a TIME parameter, which must be in CCSDS ASCII calendar segmented time code format.

Parameters
sString value
Returns
Parsed time code value.
Exceptions
IllegalArgumentExceptionIf 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, and esa.opensf.osfi.TimeValue.year.

◆ toString()

String esa.opensf.osfi.TimeValue.toString ( )

Member Data Documentation

◆ dom

final byte esa.opensf.osfi.TimeValue.dom

Day of month, 1 to 28/29/30/31 depending on the month/year combination.

◆ hour

final byte esa.opensf.osfi.TimeValue.hour

Hour, 0 to 23.

◆ minute

final byte esa.opensf.osfi.TimeValue.minute

Minute, 0 to 59.

◆ month

final byte esa.opensf.osfi.TimeValue.month

Month, 1 to 12.

◆ nanosec

final int esa.opensf.osfi.TimeValue.nanosec

Fraction of the second in nanosecond precision, 0 to 999_999_999.

◆ sec

final byte esa.opensf.osfi.TimeValue.sec

Second, 0 to 60 (to allow for leap seconds, which are not verified).

◆ year

final short esa.opensf.osfi.TimeValue.year

Year number, 1 to 9999.


The documentation for this class was generated from the following file: