Record Class Article

java.lang.Object
java.lang.Record
net.ygbstudio.jbrave.core.domain.dto.web.Article
Record Components:
author - 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 Details

    • Article

      public Article(List<Person> author, String date, Organization publisher, Thumbnail thumbnail, Boolean isAccessibleForFree)
      Creates an instance of a Article record class.
      Parameters:
      author - the value for the author record component
      date - the value for the date record component
      publisher - the value for the publisher record component
      thumbnail - the value for the thumbnail record component
      isAccessibleForFree - the value for the isAccessibleForFree 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.
    • author

      public List<Person> author()
      Returns the value of the author record component.
      Returns:
      the value of the author record component
    • date

      public String date()
      Returns the value of the date record component.
      Returns:
      the value of the date record component
    • publisher

      public Organization publisher()
      Returns the value of the publisher record component.
      Returns:
      the value of the publisher record component
    • thumbnail

      public Thumbnail thumbnail()
      Returns the value of the thumbnail record component.
      Returns:
      the value of the thumbnail record component
    • isAccessibleForFree

      public Boolean isAccessibleForFree()
      Returns the value of the isAccessibleForFree record component.
      Returns:
      the value of the isAccessibleForFree record component