Record Class TemporalDurationWithTotalRecord
java.lang.Object
java.lang.Record
com.oracle.truffle.js.runtime.builtins.temporal.TemporalDurationWithTotalRecord
public record TemporalDurationWithTotalRecord(JSTemporalDurationRecord duration, double total)
extends Record
The result record returned by the operations: RoundRelativeDuration,
DifferencePlainDateTimeWithRounding, DifferenceZonedDateTimeWithRounding.
-
Constructor Summary
ConstructorsConstructorDescriptionTemporalDurationWithTotalRecord(JSTemporalDurationRecord duration, double total) Creates an instance of aTemporalDurationWithTotalRecordrecord class. -
Method Summary
Modifier and TypeMethodDescriptionduration()Returns the value of thedurationrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.doubletotal()Returns the value of thetotalrecord component.
-
Constructor Details
-
TemporalDurationWithTotalRecord
Creates an instance of aTemporalDurationWithTotalRecordrecord class.- Parameters:
duration- the value for thedurationrecord componenttotal- the value for thetotalrecord 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. -
duration
Returns the value of thedurationrecord component.- Returns:
- the value of the
durationrecord component
-
total
public double total()Returns the value of thetotalrecord component.- Returns:
- the value of the
totalrecord component
-