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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of theforumNamerecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thenumAnswersrecord component.question()Returns the value of thequestionrecord component.score()Returns the value of thescorerecord component.title()Returns the value of thetitlerecord component.Returns the value of thetopCommentrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ForumData
public ForumData(String forumName, Integer numAnswers, String score, String title, String question, String topComment) Creates an instance of aForumDatarecord class.- Parameters:
forumName- the value for theforumNamerecord componentnumAnswers- the value for thenumAnswersrecord componentscore- the value for thescorerecord componenttitle- the value for thetitlerecord componentquestion- the value for thequestionrecord componenttopComment- the value for thetopCommentrecord component
-
-
Method Details
-
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. -
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. -
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. All components in this record class are compared withObjects::equals(Object,Object). -
forumName
Returns the value of theforumNamerecord component.- Returns:
- the value of the
forumNamerecord component
-
numAnswers
Returns the value of thenumAnswersrecord component.- Returns:
- the value of the
numAnswersrecord component
-
score
Returns the value of thescorerecord component.- Returns:
- the value of the
scorerecord component
-
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
question
Returns the value of thequestionrecord component.- Returns:
- the value of the
questionrecord component
-
topComment
Returns the value of thetopCommentrecord component.- Returns:
- the value of the
topCommentrecord component
-