refactoring: Issue #2377: The repository code has been refactored to use the recor… (#2505)

* Issue #2377: The repository code has been refactored to use the record class

* Issue #2377: Refactored according to the rules defined for the repo code

* Issue #2377: Refactored according to the rules defined for the repo code

* Issue #2377: Refactored according to the rules defined for the repo code
This commit is contained in:
Mughees Qasim
2023-05-06 14:08:12 +05:00
committed by GitHub
parent c0e1603f90
commit 3ae6b07590
26 changed files with 244 additions and 293 deletions
@@ -27,36 +27,6 @@ package com.iluwatar.privateclassdata;
/**
* Stew ingredients.
*/
public class StewData {
private final int numPotatoes;
private final int numCarrots;
private final int numMeat;
private final int numPeppers;
/**
* Constructor.
*/
public StewData(int numPotatoes, int numCarrots, int numMeat, int numPeppers) {
this.numPotatoes = numPotatoes;
this.numCarrots = numCarrots;
this.numMeat = numMeat;
this.numPeppers = numPeppers;
}
public int getNumPotatoes() {
return numPotatoes;
}
public int getNumCarrots() {
return numCarrots;
}
public int getNumMeat() {
return numMeat;
}
public int getNumPeppers() {
return numPeppers;
}
public record StewData(int numPotatoes, int numCarrots, int numMeat, int numPeppers) {
}