Record Class Packaging
java.lang.Object
java.lang.Record
com.alpermulayim.openfoodfacts_spring_boot_starter.dtos.Packaging
public record Packaging(Integer numberOfUnits, String shape, String material, String recycling, String quantityPerUnit, Double quantityPerUnitValue, String quantityPerUnitUnit, Double weightSpecified, Double weightMeasured, Double weightEstimated, Double weight, String weightSourceId)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionPackaging(Integer numberOfUnits, String shape, String material, String recycling, String quantityPerUnit, Double quantityPerUnitValue, String quantityPerUnitUnit, Double weightSpecified, Double weightMeasured, Double weightEstimated, Double weight, String weightSourceId) Creates an instance of aPackagingrecord 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.material()Returns the value of thematerialrecord component.Returns the value of thenumberOfUnitsrecord component.Returns the value of thequantityPerUnitrecord component.Returns the value of thequantityPerUnitUnitrecord component.Returns the value of thequantityPerUnitValuerecord component.Returns the value of therecyclingrecord component.shape()Returns the value of theshaperecord component.final StringtoString()Returns a string representation of this record class.weight()Returns the value of theweightrecord component.Returns the value of theweightEstimatedrecord component.Returns the value of theweightMeasuredrecord component.Returns the value of theweightSourceIdrecord component.Returns the value of theweightSpecifiedrecord component.
-
Constructor Details
-
Packaging
public Packaging(Integer numberOfUnits, String shape, String material, String recycling, String quantityPerUnit, Double quantityPerUnitValue, String quantityPerUnitUnit, Double weightSpecified, Double weightMeasured, Double weightEstimated, Double weight, String weightSourceId) Creates an instance of aPackagingrecord class.- Parameters:
numberOfUnits- the value for thenumberOfUnitsrecord componentshape- the value for theshaperecord componentmaterial- the value for thematerialrecord componentrecycling- the value for therecyclingrecord componentquantityPerUnit- the value for thequantityPerUnitrecord componentquantityPerUnitValue- the value for thequantityPerUnitValuerecord componentquantityPerUnitUnit- the value for thequantityPerUnitUnitrecord componentweightSpecified- the value for theweightSpecifiedrecord componentweightMeasured- the value for theweightMeasuredrecord componentweightEstimated- the value for theweightEstimatedrecord componentweight- the value for theweightrecord componentweightSourceId- the value for theweightSourceIdrecord 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). -
numberOfUnits
Returns the value of thenumberOfUnitsrecord component.- Returns:
- the value of the
numberOfUnitsrecord component
-
shape
Returns the value of theshaperecord component.- Returns:
- the value of the
shaperecord component
-
material
Returns the value of thematerialrecord component.- Returns:
- the value of the
materialrecord component
-
recycling
Returns the value of therecyclingrecord component.- Returns:
- the value of the
recyclingrecord component
-
quantityPerUnit
Returns the value of thequantityPerUnitrecord component.- Returns:
- the value of the
quantityPerUnitrecord component
-
quantityPerUnitValue
Returns the value of thequantityPerUnitValuerecord component.- Returns:
- the value of the
quantityPerUnitValuerecord component
-
quantityPerUnitUnit
Returns the value of thequantityPerUnitUnitrecord component.- Returns:
- the value of the
quantityPerUnitUnitrecord component
-
weightSpecified
Returns the value of theweightSpecifiedrecord component.- Returns:
- the value of the
weightSpecifiedrecord component
-
weightMeasured
Returns the value of theweightMeasuredrecord component.- Returns:
- the value of the
weightMeasuredrecord component
-
weightEstimated
Returns the value of theweightEstimatedrecord component.- Returns:
- the value of the
weightEstimatedrecord component
-
weight
Returns the value of theweightrecord component.- Returns:
- the value of the
weightrecord component
-
weightSourceId
Returns the value of theweightSourceIdrecord component.- Returns:
- the value of the
weightSourceIdrecord component
-