fix(commons/ingredient): add missing setters
This commit is contained in:
parent
1bfc103ecc
commit
9f7f32beff
4 changed files with 21 additions and 10 deletions
|
|
@ -84,10 +84,21 @@ public class Ingredient {
|
|||
public double getCarbsPer100g() {
|
||||
return carbsPer100g;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
public void setCarbsPer100g(double carbsPer100g) {
|
||||
this.carbsPer100g = carbsPer100g;
|
||||
}
|
||||
|
||||
public void setFatPer100g(double fatPer100g) {
|
||||
this.fatPer100g = fatPer100g;
|
||||
}
|
||||
|
||||
public void setProteinPer100g(double proteinPer100g) {
|
||||
this.proteinPer100g = proteinPer100g;
|
||||
}
|
||||
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
|
|
@ -101,7 +112,7 @@ public class Ingredient {
|
|||
public boolean equals(Object o) {
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
Ingredient that = (Ingredient) o;
|
||||
return id == that.id && Double.compare(proteinPer100g, that.proteinPer100g) == 0 && Double.compare(fatPer100g, that.fatPer100g) == 0 && Double.compare(carbsPer100g, that.carbsPer100g) == 0 && Objects.equals(name, that.name);
|
||||
return Objects.equals(id, that.id) && Double.compare(proteinPer100g, that.proteinPer100g) == 0 && Double.compare(fatPer100g, that.fatPer100g) == 0 && Double.compare(carbsPer100g, that.carbsPer100g) == 0 && Objects.equals(name, that.name);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue