访问者模式+中介者模式+解释器模式
2019-06-18 22:02:10 18 举报
访问者模式+中介者模式+解释器模式UML图
作者其他创作
大纲/内容
聚合
AddExpression
- expressionA:IExpression- expressionB:IExpression
+ operator(ExpressionContext)
ConcreteTenant
+ sendMsg():void+ receiveMsg():void
Client
+ main():void
ConcreteElementA
+ accept(IVisitor):void
IMediator
+ forward(String):void
ConcreteMediator
- landlords:Set<ConcreteLandlord>- tenants:Set<ConcreteTenant>
+ addLandlord():void+ removeLandload():void+ addTenant():void+ removeTenant():void+ forward(String):void
解释器模式
<<interface>>IElement
ExpressionContext
+ attribute1:type = defaultValue+ attribute2:type- attribute3:type
+ operation1(params):returnType- operation2(params)- operation3()
VisitorB
+ visitElementA(ConcreteElementA)+ visitElementB(ConcreteElementB)
<<interface>>IColleague
<<interface>>IVisitor
<<interface>>IExpression
中介者模式
访问者模式
ConcreteLandlord
VisitorA
SubstractExpression
TerminalExpression
0 条评论
下一页