Record Class MetaUrl

java.lang.Object
java.lang.Record
net.ygbstudio.jbrave.core.domain.dto.MetaUrl
Record Components:
scheme - The scheme of the URL.
netloc - The network location part of the URL.
hostname - The hostname of the URL.
favicon - The URL of the favicon associated with the URL.
path - The path component of the URL.
pathDisplay - The hierarchical path of the URL useful as a display string.

public record MetaUrl(String scheme, String netloc, String hostname, String favicon, String path, String pathDisplay) extends Record
Represents metadata about a URL in search results. This class provides structured data about URLs in the Brave Search API results.
  • Constructor Details

    • MetaUrl

      public MetaUrl(String scheme, String netloc, String hostname, String favicon, String path, String pathDisplay)
      Creates an instance of a MetaUrl record class.
      Parameters:
      scheme - the value for the scheme record component
      netloc - the value for the netloc record component
      hostname - the value for the hostname record component
      favicon - the value for the favicon record component
      path - the value for the path record component
      pathDisplay - the value for the pathDisplay 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.
    • scheme

      public String scheme()
      Returns the value of the scheme record component.
      Returns:
      the value of the scheme record component
    • netloc

      public String netloc()
      Returns the value of the netloc record component.
      Returns:
      the value of the netloc record component
    • hostname

      public String hostname()
      Returns the value of the hostname record component.
      Returns:
      the value of the hostname record component
    • favicon

      public String favicon()
      Returns the value of the favicon record component.
      Returns:
      the value of the favicon record component
    • path

      public String path()
      Returns the value of the path record component.
      Returns:
      the value of the path record component
    • pathDisplay

      public String pathDisplay()
      Returns the value of the pathDisplay record component.
      Returns:
      the value of the pathDisplay record component