auto commit

This commit is contained in:
CyC2018
2018-06-06 20:56:17 +08:00
parent 775902ade6
commit d8c6cfb89e
2 changed files with 183 additions and 162 deletions

View File

@ -1280,7 +1280,7 @@ public class CalculatorImp implements Calculator {
```java
/**
* Memento Interface to Originator
*
*
* This interface allows the originator to restore its state
*/
public interface PreviousCalculationToOriginator {
@ -1359,7 +1359,7 @@ public class Client {
// user hits CTRL + Z to undo last operation and see last result
calculator.restorePreviousCalculation(memento);
// result restored
// result restored
System.out.println(calculator.getCalculationResult());
}
}
@ -2269,7 +2269,6 @@ public class Client {
}
```
# 四、结构型
## 1. 适配器Adapter
@ -2582,7 +2581,6 @@ public class Leaf extends Component {
System.out.println("left:" + name);
}
@Override
public void add(Component component) {
throw new UnsupportedOperationException(); // 牺牲透明性换取单一职责原则,这样就不用考虑是叶子节点还是组合节点
@ -2887,7 +2885,6 @@ Java 利用缓存来加速大量小对象的访问时间。
控制对其它对象的方法。
### 类图
代理有以下四类: