From 706de9e2bf2551a85297c5ff7c122ea0f93da552 Mon Sep 17 00:00:00 2001 From: CyC2018 Date: Wed, 28 Oct 2026 13:35:21 +0800 Subject: [PATCH] =?UTF-8?q?Update=20=E8=AE=BE=E8=AE=A1=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=20-=20=E7=BB=84=E5=90=88.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 更新代码注释中透明性与单一职责原则的取舍。 --- notes/设计模式 - 组合.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notes/设计模式 - 组合.md b/notes/设计模式 - 组合.md index 71975fb9..31fd5141 100644 --- a/notes/设计模式 - 组合.md +++ b/notes/设计模式 - 组合.md @@ -80,7 +80,7 @@ public class Leaf extends Component { @Override public void add(Component component) { - throw new UnsupportedOperationException(); // 牺牲透明性换取单一职责原则,这样就不用考虑是叶子节点还是组合节点 + throw new UnsupportedOperationException(); // 牺牲单一职责原则换取透明性,这样就不用考虑是叶子节点还是组合节点 } @Override