Record Class Article
java.lang.Object
java.lang.Record
net.ygbstudio.jbrave.core.domain.dto.web.Article
- Record Components:
- List of authors who contributed to the article.date- The publication date of the article.publisher- The organization that published the article.thumbnail- A thumbnail image representing the article.isAccessibleForFree- Indicates whether the article is freely accessible without a subscription or payment.
public record Article(List<Person> author, String date, Organization publisher, Thumbnail thumbnail, Boolean isAccessibleForFree)
extends Record
Represents an article in search results, containing metadata about the article such as authors,
publication date, and accessibility information. This is typically used in the context of news
articles, blog posts, and other published content within the Brave Search API responses.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionauthor()Returns the value of theauthorrecord component.date()Returns the value of thedaterecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theisAccessibleForFreerecord component.Returns the value of thepublisherrecord component.Returns the value of thethumbnailrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Article
public Article(List<Person> author, String date, Organization publisher, Thumbnail thumbnail, Boolean isAccessibleForFree) Creates an instance of aArticlerecord class.- Parameters:
author- the value for theauthorrecord componentdate- the value for thedaterecord componentpublisher- the value for thepublisherrecord componentthumbnail- the value for thethumbnailrecord componentisAccessibleForFree- the value for theisAccessibleForFreerecord 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). -
author
Returns the value of theauthorrecord component.- Returns:
- the value of the
authorrecord component
-
date
Returns the value of thedaterecord component.- Returns:
- the value of the
daterecord component
-
publisher
Returns the value of thepublisherrecord component.- Returns:
- the value of the
publisherrecord component
-
thumbnail
Returns the value of thethumbnailrecord component.- Returns:
- the value of the
thumbnailrecord component
-
isAccessibleForFree
Returns the value of theisAccessibleForFreerecord component.- Returns:
- the value of the
isAccessibleForFreerecord component
-