Record Class Price
java.lang.Object
java.lang.Record
net.ygbstudio.jbrave.core.domain.dto.web.Price
- Record Components:
price- The numeric value of the price as a string.priceCurrency- The currency code for the price (e.g., USD, EUR).
Represents a monetary amount with its associated currency. This is used in the Brave Search API
to provide structured price information for products, services, and other items in search
results.
-
Constructor Summary
Constructors -
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.price()Returns the value of thepricerecord component.Returns the value of thepriceCurrencyrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Price
Creates an instance of aPricerecord class.- Parameters:
price- the value for thepricerecord componentpriceCurrency- the value for thepriceCurrencyrecord 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). -
price
Returns the value of thepricerecord component.- Returns:
- the value of the
pricerecord component
-
priceCurrency
Returns the value of thepriceCurrencyrecord component.- Returns:
- the value of the
priceCurrencyrecord component
-