Record Class LessonInfo

java.lang.Object
java.lang.Record
inha.dayoook_e.tutee.api.controller.dto.response.LessonInfo

public record LessonInfo(@NotNull Integer id, @NotNull String startTime, @NotNull Integer tutorId, @NotNull String tutorName, Status status) extends Record
  • Constructor Summary

    Constructors
    Constructor
    Description
    LessonInfo(@NotNull Integer id, @NotNull String startTime, @NotNull Integer tutorId, @NotNull String tutorName, Status status)
    Creates an instance of a LessonInfo record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    @NotNull Integer
    id()
    Returns the value of the id record component.
    @NotNull String
    Returns the value of the startTime record component.
    Returns the value of the status record component.
    final String
    Returns a string representation of this record class.
    @NotNull Integer
    Returns the value of the tutorId record component.
    @NotNull String
    Returns the value of the tutorName record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • LessonInfo

      public LessonInfo(@NotNull @NotNull Integer id, @NotNull @NotNull String startTime, @NotNull @NotNull Integer tutorId, @NotNull @NotNull String tutorName, Status status)
      Creates an instance of a LessonInfo record class.
      Parameters:
      id - the value for the id record component
      startTime - the value for the startTime record component
      tutorId - the value for the tutorId record component
      tutorName - the value for the tutorName record component
      status - the value for the status 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.
    • id

      @NotNull public @NotNull Integer id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • startTime

      @NotNull public @NotNull String startTime()
      Returns the value of the startTime record component.
      Returns:
      the value of the startTime record component
    • tutorId

      @NotNull public @NotNull Integer tutorId()
      Returns the value of the tutorId record component.
      Returns:
      the value of the tutorId record component
    • tutorName

      @NotNull public @NotNull String tutorName()
      Returns the value of the tutorName record component.
      Returns:
      the value of the tutorName record component
    • status

      public Status status()
      Returns the value of the status record component.
      Returns:
      the value of the status record component