Record Class HighlyStructuredDateTimeComponent

java.lang.Object
java.lang.Record
it.auties.whatsapp.model.button.template.highlyStructured.HighlyStructuredDateTimeComponent
All Implemented Interfaces:
it.auties.protobuf.model.ProtobufMessage, it.auties.protobuf.model.ProtobufObject, HighlyStructuredDateTimeValue

public record HighlyStructuredDateTimeComponent(HighlyStructuredDateTimeComponent.DayOfWeek dayOfWeek, int year, int month, int dayOfMonth, int hour, int minute, HighlyStructuredDateTimeComponent.CalendarType calendar) extends Record implements HighlyStructuredDateTimeValue
A model class that represents a time component
  • Field Details

    • dayOfWeek

      The field for the dayOfWeek record component.
    • year

      private final int year
      The field for the year record component.
    • month

      private final int month
      The field for the month record component.
    • dayOfMonth

      private final int dayOfMonth
      The field for the dayOfMonth record component.
    • hour

      private final int hour
      The field for the hour record component.
    • minute

      private final int minute
      The field for the minute record component.
    • calendar

      The field for the calendar record component.
  • Constructor Details

    • HighlyStructuredDateTimeComponent

      public HighlyStructuredDateTimeComponent(HighlyStructuredDateTimeComponent.DayOfWeek dayOfWeek, int year, int month, int dayOfMonth, int hour, int minute, HighlyStructuredDateTimeComponent.CalendarType calendar)
      Creates an instance of a HighlyStructuredDateTimeComponent record class.
      Parameters:
      dayOfWeek - the value for the dayOfWeek record component
      year - the value for the year record component
      month - the value for the month record component
      dayOfMonth - the value for the dayOfMonth record component
      hour - the value for the hour record component
      minute - the value for the minute record component
      calendar - the value for the calendar record component
  • Method Details

    • dateType

      Description copied from interface: HighlyStructuredDateTimeValue
      Returns the type of date
      Specified by:
      dateType in interface HighlyStructuredDateTimeValue
      Returns:
      a non-null type
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • dayOfWeek

      Returns the value of the dayOfWeek record component.
      Returns:
      the value of the dayOfWeek record component
    • year

      public int year()
      Returns the value of the year record component.
      Returns:
      the value of the year record component
    • month

      public int month()
      Returns the value of the month record component.
      Returns:
      the value of the month record component
    • dayOfMonth

      public int dayOfMonth()
      Returns the value of the dayOfMonth record component.
      Returns:
      the value of the dayOfMonth record component
    • hour

      public int hour()
      Returns the value of the hour record component.
      Returns:
      the value of the hour record component
    • minute

      public int minute()
      Returns the value of the minute record component.
      Returns:
      the value of the minute record component
    • calendar

      Returns the value of the calendar record component.
      Returns:
      the value of the calendar record component