Changed package naming across all examples.
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package com.iluwatar.privateclassdata;
|
||||
|
||||
/**
|
||||
*
|
||||
* Immutable stew class, protected with Private Class Data pattern
|
||||
*
|
||||
*/
|
||||
public class ImmutableStew {
|
||||
|
||||
private StewData data;
|
||||
|
||||
public ImmutableStew(int numPotatoes, int numCarrots, int numMeat, int numPeppers) {
|
||||
data = new StewData(numPotatoes, numCarrots, numMeat, numPeppers);
|
||||
}
|
||||
|
||||
public void mix() {
|
||||
System.out.println(String.format("Mixing the immutable stew we find: %d potatoes, %d carrots, %d meat and %d peppers",
|
||||
data.getNumPotatoes(), data.getNumCarrots(), data.getNumMeat(), data.getNumPeppers()));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user