未验证 提交 f4fa73cd 编写于 作者: W Wei Seng 提交者: GitHub

Update README.md

Increase clarity
上级 08cec0e2
......@@ -17,7 +17,7 @@ attributes by encapsulating them in single Data object.
Real world example
> Imagine you are cooking a stew for your family for dinner.You want to prevent your family members from comsuming the stew by tasting it while you are cooking, otherwise there will be no more stew for dinner later.
> Imagine you are cooking a stew for your family for dinner. You want to prevent your family members from comsuming the stew by tasting it while you are cooking, otherwise there will be no more stew for dinner later.
In plain words
......@@ -66,7 +66,7 @@ public class Stew {
}
```
Now, we have ImmutableStew class, where its ingredient is protected by StewData class so methods are unable to manipulate the data of the stew.
Now, we have ImmutableStew class, where its data is protected by StewData class. Now, the methods in are unable to manipulate the data of the ImmutableStew class.
```
public class StewData {
private final int numPotatoes;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册