Record Class OpenPriceFactsResponse
java.lang.Object
java.lang.Record
com.alpermulayim.openfoodfacts_spring_boot_starter.responses.openprices.OpenPriceFactsResponse
public record OpenPriceFactsResponse(List<ProductPrice> prices, int page, int pages, int size, int total)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionOpenPriceFactsResponse(List<ProductPrice> prices, int page, int pages, int size, int total) Creates an instance of aOpenPriceFactsResponserecord 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.intpage()Returns the value of thepagerecord component.intpages()Returns the value of thepagesrecord component.prices()Returns the value of thepricesrecord component.intsize()Returns the value of thesizerecord component.final StringtoString()Returns a string representation of this record class.inttotal()Returns the value of thetotalrecord component.
-
Constructor Details
-
OpenPriceFactsResponse
Creates an instance of aOpenPriceFactsResponserecord class.- Parameters:
prices- the value for thepricesrecord componentpage- the value for thepagerecord componentpages- the value for thepagesrecord componentsize- the value for thesizerecord componenttotal- the value for thetotalrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
prices
Returns the value of thepricesrecord component.- Returns:
- the value of the
pricesrecord component
-
page
public int page()Returns the value of thepagerecord component.- Returns:
- the value of the
pagerecord component
-
pages
public int pages()Returns the value of thepagesrecord component.- Returns:
- the value of the
pagesrecord component
-
size
public int size()Returns the value of thesizerecord component.- Returns:
- the value of the
sizerecord component
-
total
public int total()Returns the value of thetotalrecord component.- Returns:
- the value of the
totalrecord component
-