Decorator && Visitor
2017-08-02 17:06:11 0 举报
Decorator && Visitor
作者其他创作
大纲/内容
FullBorder
accept
ListVisitor
File
实现Implements
Eleme3nt
数据结构和处理分开
Border
Entry
Uses
ConcreteComponent
Visitor
namedir
ConcreteDecorator
Visit(File)Visit(Directory)
继承extends
acceptgetNamegetSizeadditerator
Has
method 1method 2method 3
关联HAS
Decorator
Display
向文件中add时发生的异常的类
表示访问者的抽象类,访问文件和文件夹
SideBorder
getColumnsgetRowsgetRowText
FileTreatementException
getColumnsgetRowsgetRowTextmakeLine
getColumnsgetRowsgetRowTextshow
类和接口一览表
文件类
StringDisplay
visitor类的子类,显示文件和文件夹一览
file和Directory类的父类,抽象类,实现了Element接口
用于显示字符串的抽象类
关联Has
说明
表示数据结构的接口,接受访问者的访问
Element
Main
borderChar
名字
Decorator
Directory
string
currentdir
getNamegetSizeadditerator
acceptgetNamegetSize
directory
用于显示上下边框的类
实现implements
ObjectStructure
Visitor
文件夹类
用于显示单行字符串的类
ConcreteElementA
component
测试程序行为的类
用于只显示左右边框的类
Component
用于显示装饰边框的抽象类
namesize
display
收藏
收藏
0 条评论
下一页