Record Class ImageProperties
java.lang.Object
java.lang.Record
net.ygbstudio.jbrave.core.domain.dto.web.ImageProperties
- Record Components:
url- The original URL of the image.resized- A URL to a resized version of the image.placeholder- A URL to a placeholder version of the image.height- The height of the image in pixels.width- The width of the image in pixels.format- The file format of the image.contentSize- The size of the image content.
public record ImageProperties(String url, String resized, String placeholder, Integer height, Integer width, String format, String contentSize)
extends Record
Represents the properties of an image in search results. This is used in the Brave Search API to
provide structured data about image attributes including dimensions, format, and URLs.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecontentSizerecord component.final booleanIndicates whether some other object is "equal to" this one.format()Returns the value of theformatrecord component.final inthashCode()Returns a hash code value for this object.height()Returns the value of theheightrecord component.Returns the value of theplaceholderrecord component.resized()Returns the value of theresizedrecord component.final StringtoString()Returns a string representation of this record class.url()Returns the value of theurlrecord component.width()Returns the value of thewidthrecord component.
-
Constructor Details
-
ImageProperties
public ImageProperties(String url, String resized, String placeholder, Integer height, Integer width, String format, String contentSize) Creates an instance of aImagePropertiesrecord class.- Parameters:
url- the value for theurlrecord componentresized- the value for theresizedrecord componentplaceholder- the value for theplaceholderrecord componentheight- the value for theheightrecord componentwidth- the value for thewidthrecord componentformat- the value for theformatrecord componentcontentSize- the value for thecontentSizerecord 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). -
url
Returns the value of theurlrecord component.- Returns:
- the value of the
urlrecord component
-
resized
Returns the value of theresizedrecord component.- Returns:
- the value of the
resizedrecord component
-
placeholder
Returns the value of theplaceholderrecord component.- Returns:
- the value of the
placeholderrecord component
-
height
Returns the value of theheightrecord component.- Returns:
- the value of the
heightrecord component
-
width
Returns the value of thewidthrecord component.- Returns:
- the value of the
widthrecord component
-
format
Returns the value of theformatrecord component.- Returns:
- the value of the
formatrecord component
-
contentSize
Returns the value of thecontentSizerecord component.- Returns:
- the value of the
contentSizerecord component
-