Record Class TripAdvisorReview
java.lang.Object
java.lang.Record
net.ygbstudio.jbrave.core.domain.dto.web.TripAdvisorReview
- Record Components:
title- The title of the review.description- The full text content of the review.date- The date when the review was posted.rating- The rating given in the review.- The person who wrote the review.reviewUrl- The URL of the full review on TripAdvisor.language- The language the review is written in.
public record TripAdvisorReview(String title, String description, String date, Rating rating, Person author, String reviewUrl, String language)
extends Record
Represents a review from TripAdvisor in search results. This is used in the Brave Search API to
provide structured data about reviews from TripAdvisor.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionauthor()Returns the value of theauthorrecord component.date()Returns the value of thedaterecord component.Returns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.language()Returns the value of thelanguagerecord component.rating()Returns the value of theratingrecord component.Returns the value of thereviewUrlrecord component.title()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TripAdvisorReview
public TripAdvisorReview(String title, String description, String date, Rating rating, Person author, String reviewUrl, String language) Creates an instance of aTripAdvisorReviewrecord class.- Parameters:
title- the value for thetitlerecord componentdescription- the value for thedescriptionrecord componentdate- the value for thedaterecord componentrating- the value for theratingrecord componentauthor- the value for theauthorrecord componentreviewUrl- the value for thereviewUrlrecord componentlanguage- the value for thelanguagerecord 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). -
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
date
Returns the value of thedaterecord component.- Returns:
- the value of the
daterecord component
-
rating
Returns the value of theratingrecord component.- Returns:
- the value of the
ratingrecord component
-
author
Returns the value of theauthorrecord component.- Returns:
- the value of the
authorrecord component
-
reviewUrl
Returns the value of thereviewUrlrecord component.- Returns:
- the value of the
reviewUrlrecord component
-
language
Returns the value of thelanguagerecord component.- Returns:
- the value of the
languagerecord component
-