Record Class Reviews
java.lang.Object
java.lang.Record
net.ygbstudio.jbrave.core.domain.dto.web.Reviews
- Record Components:
results- A list of TripAdvisorReview objects containing individual review data.viewMoreUrl- A URL where more reviews can be viewed, if available.reviewsInForeignLanguage- Indicates if some reviews are in a language different from the primary language of the search results.
public record Reviews(List<TripAdvisorReview> results, String viewMoreUrl, Boolean reviewsInForeignLanguage)
extends Record
Represents a collection of reviews in search results, typically associated with a business,
product, or service. This is used in the Brave Search API to group multiple reviews together,
particularly for platforms like TripAdvisor.
-
Constructor Summary
ConstructorsConstructorDescriptionReviews(List<TripAdvisorReview> results, String viewMoreUrl, Boolean reviewsInForeignLanguage) Creates an instance of aReviewsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.results()Returns the value of theresultsrecord component.Returns the value of thereviewsInForeignLanguagerecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theviewMoreUrlrecord component.
-
Constructor Details
-
Reviews
public Reviews(List<TripAdvisorReview> results, String viewMoreUrl, Boolean reviewsInForeignLanguage) Creates an instance of aReviewsrecord class.- Parameters:
results- the value for theresultsrecord componentviewMoreUrl- the value for theviewMoreUrlrecord componentreviewsInForeignLanguage- the value for thereviewsInForeignLanguagerecord 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). -
results
Returns the value of theresultsrecord component.- Returns:
- the value of the
resultsrecord component
-
viewMoreUrl
Returns the value of theviewMoreUrlrecord component.- Returns:
- the value of the
viewMoreUrlrecord component
-
reviewsInForeignLanguage
Returns the value of thereviewsInForeignLanguagerecord component.- Returns:
- the value of the
reviewsInForeignLanguagerecord component
-