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 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 a Packaging record class.
      Parameters:
      numberOfUnits - the value for the numberOfUnits record component
      shape - the value for the shape record component
      material - the value for the material record component
      recycling - the value for the recycling record component
      quantityPerUnit - the value for the quantityPerUnit record component
      quantityPerUnitValue - the value for the quantityPerUnitValue record component
      quantityPerUnitUnit - the value for the quantityPerUnitUnit record component
      weightSpecified - the value for the weightSpecified record component
      weightMeasured - the value for the weightMeasured record component
      weightEstimated - the value for the weightEstimated record component
      weight - the value for the weight record component
      weightSourceId - the value for the weightSourceId record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • numberOfUnits

      public Integer numberOfUnits()
      Returns the value of the numberOfUnits record component.
      Returns:
      the value of the numberOfUnits record component
    • shape

      public String shape()
      Returns the value of the shape record component.
      Returns:
      the value of the shape record component
    • material

      public String material()
      Returns the value of the material record component.
      Returns:
      the value of the material record component
    • recycling

      public String recycling()
      Returns the value of the recycling record component.
      Returns:
      the value of the recycling record component
    • quantityPerUnit

      public String quantityPerUnit()
      Returns the value of the quantityPerUnit record component.
      Returns:
      the value of the quantityPerUnit record component
    • quantityPerUnitValue

      public Double quantityPerUnitValue()
      Returns the value of the quantityPerUnitValue record component.
      Returns:
      the value of the quantityPerUnitValue record component
    • quantityPerUnitUnit

      public String quantityPerUnitUnit()
      Returns the value of the quantityPerUnitUnit record component.
      Returns:
      the value of the quantityPerUnitUnit record component
    • weightSpecified

      public Double weightSpecified()
      Returns the value of the weightSpecified record component.
      Returns:
      the value of the weightSpecified record component
    • weightMeasured

      public Double weightMeasured()
      Returns the value of the weightMeasured record component.
      Returns:
      the value of the weightMeasured record component
    • weightEstimated

      public Double weightEstimated()
      Returns the value of the weightEstimated record component.
      Returns:
      the value of the weightEstimated record component
    • weight

      public Double weight()
      Returns the value of the weight record component.
      Returns:
      the value of the weight record component
    • weightSourceId

      public String weightSourceId()
      Returns the value of the weightSourceId record component.
      Returns:
      the value of the weightSourceId record component