Record Class OpenFoodFactsResponse
java.lang.Object
java.lang.Record
com.alpermulayim.openfoodfacts_spring_boot_starter.responses.OpenFoodFactsResponse
-
Constructor Summary
ConstructorsConstructorDescriptionOpenFoodFactsResponse
(String code, Product product, Long status, String statusVerbose) Creates an instance of aOpenFoodFactsResponse
record class. -
Method Summary
Modifier and TypeMethodDescriptioncode()
Returns the value of thecode
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.product()
Returns the value of theproduct
record component.status()
Returns the value of thestatus
record component.Returns the value of thestatusVerbose
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
OpenFoodFactsResponse
Creates an instance of aOpenFoodFactsResponse
record class.- Parameters:
code
- the value for thecode
record componentproduct
- the value for theproduct
record componentstatus
- the value for thestatus
record componentstatusVerbose
- the value for thestatusVerbose
record 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)
. -
code
Returns the value of thecode
record component.- Returns:
- the value of the
code
record component
-
product
Returns the value of theproduct
record component.- Returns:
- the value of the
product
record component
-
status
Returns the value of thestatus
record component.- Returns:
- the value of the
status
record component
-
statusVerbose
Returns the value of thestatusVerbose
record component.- Returns:
- the value of the
statusVerbose
record component
-