File tree Expand file tree Collapse file tree 2 files changed +3
-18
lines changed
Expand file tree Collapse file tree 2 files changed +3
-18
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ public interface DrawTool {
6767
6868## 定义工具实现类,可以多个
6969``` java
70- // 画圆A,实现了图画基础API
70+ // DrawStyeA.java 画圆A,实现了图画基础API
7171public class DrawStyeA implements DrawTool {
7272 @Override
7373 public void drawStyle () {
@@ -77,7 +77,7 @@ public class DrawStyeA implements DrawTool {
7777```
7878
7979``` java
80- // 画圆B,实现了图画基础API
80+ // DrawStyleB.java 画圆B,实现了图画基础API
8181public class DrawStyleB implements DrawTool {
8282 @Override
8383 public void drawStyle () {
@@ -88,7 +88,6 @@ public class DrawStyleB implements DrawTool {
8888
8989## 测试调用
9090``` java
91-
9291 /**
9392 * 桥接模式是将基础抽象类作为桥接器,用来连接业务对象和具体动作,将两者充分解耦。
9493 * 具体对象以抽象对象为父类,实现父类方法。
Original file line number Diff line number Diff line change @@ -6,18 +6,4 @@ type ObserverAPI interface {
66 GetName () string
77 SetName (name string )
88 Update (content string )
9- }
10-
11- // constructor(name) {
12- // this.name = name || this.constructor.name
13- // }
14-
15- // // 观察者发出更新通知,观察者自行监听
16- // update(content) {
17- // fmt.Println(`${this.constructor.name}::update() [content = ${content}]`)
18- // }
19-
20- // setName(name) {
21- // this.name = name
22- // }
23- // }
9+ }
You can’t perform that action at this time.
0 commit comments