public class Composite extends Component
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addChild(Component component) |
void |
printStructure(String preStr)
组件的通用操作: 用于打印组件自身的结构
|
void |
removeChild(Component component) |
getChildrenpublic Composite(String name)
public void printStructure(String preStr)
ComponentprintStructure 在类中 Componentpublic void removeChild(Component component)
removeChild 在类中 ComponentCopyright © 2016. All rights reserved.