• 简单易懂の现代魔法
  • Maths
  • Projects
  • Documents
  • Archives
  • Weibo
  • About
  • Rss
  • 简单易懂の现代魔法
  • Maths
  • Projects
  • Documents
  • Archives
  • Weibo
  • About
  • Rss

策略模式(Strategy Pattern)

2025-05-10

behavioral, strategy

定义了算法族,分别封装起来,让它们之间可相互替换,此模式让算法的变化独立于使用算法的客户。

Read more

状态模式(State Pattern)

2025-05-10

behavioral, state

允许对象在内部状态改变时改变它的行为,对象看起来好像修改了它的类。

Read more

解析器模式(Interpreter Pattern)

2025-05-10

behavioral, interpreter

提供了评估语言的语法或表达式的方式,它属于行为模式。这种模式实现了一个表达式接口,该接口解析一个特定的上下文。这种模式被用在SQL解析、符号处理引擎等。

Read more

备忘录模式(Memento Pattern)

2025-05-10

behavioral, memento

保存一个对象的某个状态,以便在适当的时候恢复对象。备忘录模式属于行为模式。

Read more

中介模式(Mediator Pattern)

2025-05-10

behavioral, mediator

用来降低多个对象和类之前的通信复杂性。这种模式提供了一个中介类,该类通常处理不同类之前的通信,并支持松耦合,使代码易于维护。

Read more
<<123...35>>
©2016 - 2026 barudisshu, unless otherwise noted.