Composite Pattern
Composite pattern helps when objects have root and leaf relationships, if root and all levels of leaf all implement same method, we can only talk to the root to get the final result which we want, and leave the handling between root and all levels of leaf.
原创
2021-11-07 14:01:24 ·
61 阅读 ·
0 评论