Record Class DateDurationRecord
java.lang.Object
java.lang.Record
com.oracle.truffle.js.runtime.builtins.temporal.DateDurationRecord
public record DateDurationRecord(double years, double months, double weeks, double days)
extends Record
CreateDateDurationRecord result.
-
Constructor Summary
ConstructorsConstructorDescriptionDateDurationRecord(double years, double months, double weeks, double days) Creates an instance of aDateDurationRecordrecord 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.doublemonths()Returns the value of themonthsrecord component.final StringtoString()Returns a string representation of this record class.doubleweeks()Returns the value of theweeksrecord component.doubleyears()Returns the value of theyearsrecord component.
-
Constructor Details
-
DateDurationRecord
public DateDurationRecord(double years, double months, double weeks, double days) Creates an instance of aDateDurationRecordrecord class.- Parameters:
years- the value for theyearsrecord componentmonths- the value for themonthsrecord componentweeks- the value for theweeksrecord componentdays- the value for thedaysrecord 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. -
years
public double years()Returns the value of theyearsrecord component.- Returns:
- the value of the
yearsrecord component
-
months
public double months()Returns the value of themonthsrecord component.- Returns:
- the value of the
monthsrecord component
-
weeks
public double weeks()Returns the value of theweeksrecord component.- Returns:
- the value of the
weeksrecord component
-
days
public double days()Returns the value of thedaysrecord component.- Returns:
- the value of the
daysrecord component
-