Record Class Image
java.lang.Object
java.lang.Record
net.ygbstudio.jbrave.core.domain.dto.web.Image
- Record Components:
thumbnail- A thumbnail representation of the image, typically with smaller dimensions for preview purposes.url- The direct URL to the full-size image.properties- Additional properties of the image, such as dimensions and format.
Represents an image in search results, containing the image's URL, thumbnail, and additional
properties. This is used in the Brave Search API to provide structured image data that can be
displayed to users.
-
Constructor Summary
ConstructorsConstructorDescriptionImage(Thumbnail thumbnail, String url, ImageProperties properties) Creates an instance of aImagerecord 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.Returns the value of thepropertiesrecord component.Returns the value of thethumbnailrecord component.final StringtoString()Returns a string representation of this record class.url()Returns the value of theurlrecord component.
-
Constructor Details
-
Image
Creates an instance of aImagerecord class.- Parameters:
thumbnail- the value for thethumbnailrecord componenturl- the value for theurlrecord componentproperties- the value for thepropertiesrecord 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). -
thumbnail
Returns the value of thethumbnailrecord component.- Returns:
- the value of the
thumbnailrecord component
-
url
Returns the value of theurlrecord component.- Returns:
- the value of the
urlrecord component
-
properties
Returns the value of thepropertiesrecord component.- Returns:
- the value of the
propertiesrecord component
-