Record Class ForumData

java.lang.Object
java.lang.Record
net.ygbstudio.jbrave.core.domain.dto.web.ForumData
Record Components:
forumName - The name of the forum where the post is located.
numAnswers - The number of answers or replies to the forum post.
score - The score or rating of the forum post, if available.
title - The title of the forum post.
question - The main question or content of the forum post.
topComment - The top or most relevant comment from the forum post.

public record ForumData(String forumName, Integer numAnswers, String score, String title, String question, String topComment) extends Record
Represents forum data in search results, containing information about forum posts and discussions that are relevant to the search query. This is typically used in the context of community discussions and question-and-answer platforms.
  • Constructor Details

    • ForumData

      public ForumData(String forumName, Integer numAnswers, String score, String title, String question, String topComment)
      Creates an instance of a ForumData record class.
      Parameters:
      forumName - the value for the forumName record component
      numAnswers - the value for the numAnswers record component
      score - the value for the score record component
      title - the value for the title record component
      question - the value for the question record component
      topComment - the value for the topComment 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.
    • forumName

      public String forumName()
      Returns the value of the forumName record component.
      Returns:
      the value of the forumName record component
    • numAnswers

      public Integer numAnswers()
      Returns the value of the numAnswers record component.
      Returns:
      the value of the numAnswers record component
    • score

      public String score()
      Returns the value of the score record component.
      Returns:
      the value of the score record component
    • title

      public String title()
      Returns the value of the title record component.
      Returns:
      the value of the title record component
    • question

      public String question()
      Returns the value of the question record component.
      Returns:
      the value of the question record component
    • topComment

      public String topComment()
      Returns the value of the topComment record component.
      Returns:
      the value of the topComment record component