技术栈

组合模式composite

Aloha_up2024-09-07 13:58

学习笔记,原文链接 https://refactoringguru.cn/design-patterns/composite

将对象组合成树状结构, 并且能像使用独立对象一样使用它们。组合最主要的功能是在整个树状结构上递归调用方法并对结果进行汇总。

可以把各种形状组合到一个CompoundShape类中,统一处理。多个shape全加进来一起paint的


上一篇:组合模式(Composite Pattern)
下一篇:sicp每日一题[2.1]
相关推荐
apolloyhl
4 天前
Composite 组合模式
组合模式
进击的小头
7 天前
创建型模式:组合模式(C语言实现与嵌入式实战)
c语言·开发语言·组合模式
小码过河.
7 天前
设计模式——组合模式
组合模式
茶本无香
9 天前
设计模式之六—组合模式:构建树形结构的艺术
java·设计模式·组合模式
Yu_Lijing
13 天前
基于C++的《Head First设计模式》笔记——组合模式
c++·笔记·设计模式·组合模式
sxlishaobin
19 天前
设计模式之组合模式
设计模式·组合模式
Engineer邓祥浩
20 天前
设计模式学习(11) 23-9 组合模式
学习·设计模式·组合模式
Geoking.
21 天前
【设计模式】组合模式(Composite)详解
java·设计模式·组合模式
蔺太微
21 天前
组合模式(Composite Pattern)
设计模式·组合模式
会员果汁
21 天前
15.设计模式-组合模式
设计模式·组合模式
热门推荐
01GitHub 镜像站点02Clawdbot 中文汉化版 接入微信、飞书03OpenCode 入门教程:介绍 · 安装 · 配置第三方 API (如 Claude)04OpenClaw部署与配置教程:在Mac mini上接入国产大模型与飞书05UV安装并设置国内源062026美赛A题智能手机电池续航时间预测的连续时间数学模型07Claude Code + GLM4.7 避坑指南:解决 Unable to connect to Anthropic services08Claude Code Skills 实用使用手册09Linux下V2Ray安装配置指南10在Trae中使用Pencil MCP