Record Class NormalizedDurationRecord
java.lang.Object
java.lang.Record
com.oracle.truffle.js.runtime.builtins.temporal.NormalizedDurationRecord
- Record Components:
years- a float64-representable integermonths- a float64-representable integerweeks- a float64-representable integerdays- a float64-representable integernormalizedTimeTotalNanoseconds- a Normalized Time Duration Record (the time portion).
public record NormalizedDurationRecord(double years, double months, double weeks, double days, BigInt normalizedTimeTotalNanoseconds)
extends Record
Normalized Duration Record.
-
Constructor Summary
ConstructorsConstructorDescriptionNormalizedDurationRecord(double years, double months, double weeks, double days, BigInt normalizedTimeTotalNanoseconds) Creates an instance of aNormalizedDurationRecordrecord 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.Returns the value of thenormalizedTimeTotalNanosecondsrecord 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
-
NormalizedDurationRecord
public NormalizedDurationRecord(double years, double months, double weeks, double days, BigInt normalizedTimeTotalNanoseconds) Creates an instance of aNormalizedDurationRecordrecord class.- Parameters:
years- the value for theyearsrecord componentmonths- the value for themonthsrecord componentweeks- the value for theweeksrecord componentdays- the value for thedaysrecord componentnormalizedTimeTotalNanoseconds- the value for thenormalizedTimeTotalNanosecondsrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
years
-
months
-
weeks
-
days
-
normalizedTimeTotalNanoseconds
Returns the value of thenormalizedTimeTotalNanosecondsrecord component.- Returns:
- the value of the
normalizedTimeTotalNanosecondsrecord component
-