Record Class TimeRecord
java.lang.Object
java.lang.Record
com.oracle.truffle.js.runtime.builtins.temporal.TimeRecord
- Record Components:
days- A number of overflow days. An integer >= 0.hour- The number of the hour. An integer in the inclusive range 0 to 23.minute- The number of the minute. An integer in the inclusive range 0 to 59.second- The number of the second. An integer in the inclusive range 0 to 59.millisecond- The number of the millisecond. An integer in the inclusive range 0 to 999.microsecond- The number of the microsecond. An integer in the inclusive range 0 to 999.nanosecond- The number of the nanosecond. An integer in the inclusive range 0 to 999.
public record TimeRecord(double days, int hour, int minute, int second, int millisecond, int microsecond, int nanosecond)
extends Record
A Time Record is used to represent a valid clock time, together with a number of overflow days
such as might occur in BalanceTime. For any Time Record t, IsValidTime(t.[[Hour]], t.[[Minute]],
t.[[Second]], t.[[Millisecond]], t.[[Microsecond]], t.[[Nanosecond]]) must return true.
-
Constructor Summary
ConstructorsConstructorDescriptionTimeRecord(double days, int hour, int minute, int second, int millisecond, int microsecond, int nanosecond) Creates an instance of aTimeRecordrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubledays()Returns the value of thedaysrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.inthour()Returns the value of thehourrecord component.intReturns the value of themicrosecondrecord component.intReturns the value of themillisecondrecord component.intminute()Returns the value of theminuterecord component.intReturns the value of thenanosecondrecord component.intsecond()Returns the value of thesecondrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TimeRecord
public TimeRecord(double days, int hour, int minute, int second, int millisecond, int microsecond, int nanosecond) Creates an instance of aTimeRecordrecord class.- Parameters:
days- the value for thedaysrecord componenthour- the value for thehourrecord componentminute- the value for theminuterecord componentsecond- the value for thesecondrecord componentmillisecond- the value for themillisecondrecord componentmicrosecond- the value for themicrosecondrecord componentnanosecond- the value for thenanosecondrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
days
-
hour
-
minute
-
second
-
millisecond
public int millisecond()Returns the value of themillisecondrecord component.- Returns:
- the value of the
millisecondrecord component
-
microsecond
public int microsecond()Returns the value of themicrosecondrecord component.- Returns:
- the value of the
microsecondrecord component
-
nanosecond
public int nanosecond()Returns the value of thenanosecondrecord component.- Returns:
- the value of the
nanosecondrecord component
-