Record Class TimeZoneMethodsRecord

java.lang.Object
java.lang.Record
com.oracle.truffle.js.runtime.builtins.temporal.TimeZoneMethodsRecord
Record Components:
receiver - The time zone object, or a string indicating a built-in time zone. A String or Object.
getOffsetNanosecondsFor - The time zone's getOffsetNanosecondsFor method. For a built-in time zone this is always %Temporal.TimeZone.prototype.getOffsetNanosecondsFor%. A function object or null.
getPossibleInstantsFor - The time zone's getPossibleInstantsFor method. For a built-in time zone this is always %Temporal.TimeZone.prototype.getPossibleInstantsFor%. A function object or null.

public record TimeZoneMethodsRecord(Object receiver, Object getOffsetNanosecondsFor, Object getPossibleInstantsFor) extends Record
Time Zone Methods Record. Field values may be null in case they have not been read, and therefore must not be used. Conversely, fields that have been read must not be null. The receiver must never be null.
  • Constructor Details

    • TimeZoneMethodsRecord

      public TimeZoneMethodsRecord(Object receiver, Object getOffsetNanosecondsFor)
    • TimeZoneMethodsRecord

      public TimeZoneMethodsRecord(Object receiver, Object getOffsetNanosecondsFor, Object getPossibleInstantsFor)
      Creates an instance of a TimeZoneMethodsRecord record class.
      Parameters:
      receiver - the value for the receiver record component
      getOffsetNanosecondsFor - the value for the getOffsetNanosecondsFor record component
      getPossibleInstantsFor - the value for the getPossibleInstantsFor record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • receiver

      public Object receiver()
      Returns the value of the receiver record component.
      Returns:
      the value of the receiver record component
    • getOffsetNanosecondsFor

      public Object getOffsetNanosecondsFor()
      Returns the value of the getOffsetNanosecondsFor record component.
      Returns:
      the value of the getOffsetNanosecondsFor record component
    • getPossibleInstantsFor

      public Object getPossibleInstantsFor()
      Returns the value of the getPossibleInstantsFor record component.
      Returns:
      the value of the getPossibleInstantsFor record component