Record Class TimeDurationRecord
java.lang.Object
java.lang.Record
com.oracle.truffle.js.runtime.builtins.temporal.TimeDurationRecord
public record TimeDurationRecord(double days, double hours, double minutes, double seconds, double milliseconds, double microseconds, double nanoseconds)
extends Record
CreateTimeDurationRecord result.
-
Constructor Summary
ConstructorsConstructorDescriptionTimeDurationRecord(double days, double hours, double minutes, double seconds, double milliseconds, double microseconds, double nanoseconds) Creates an instance of aTimeDurationRecordrecord 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.doublehours()Returns the value of thehoursrecord component.doubleReturns the value of themicrosecondsrecord component.doubleReturns the value of themillisecondsrecord component.doubleminutes()Returns the value of theminutesrecord component.doubleReturns the value of thenanosecondsrecord component.doubleseconds()Returns the value of thesecondsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TimeDurationRecord
public TimeDurationRecord(double days, double hours, double minutes, double seconds, double milliseconds, double microseconds, double nanoseconds) Creates an instance of aTimeDurationRecordrecord class.- Parameters:
days- the value for thedaysrecord componenthours- the value for thehoursrecord componentminutes- the value for theminutesrecord componentseconds- the value for thesecondsrecord componentmilliseconds- the value for themillisecondsrecord componentmicroseconds- the value for themicrosecondsrecord componentnanoseconds- the value for thenanosecondsrecord 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
public double days()Returns the value of thedaysrecord component.- Returns:
- the value of the
daysrecord component
-
hours
public double hours()Returns the value of thehoursrecord component.- Returns:
- the value of the
hoursrecord component
-
minutes
public double minutes()Returns the value of theminutesrecord component.- Returns:
- the value of the
minutesrecord component
-
seconds
public double seconds()Returns the value of thesecondsrecord component.- Returns:
- the value of the
secondsrecord component
-
milliseconds
public double milliseconds()Returns the value of themillisecondsrecord component.- Returns:
- the value of the
millisecondsrecord component
-
microseconds
public double microseconds()Returns the value of themicrosecondsrecord component.- Returns:
- the value of the
microsecondsrecord component
-
nanoseconds
public double nanoseconds()Returns the value of thenanosecondsrecord component.- Returns:
- the value of the
nanosecondsrecord component
-