Mercurial > docs > DesignPatterns
view code/composite-leaf.java @ 10:3f937af7e13e
added Erweiterungen; commented things out; other small things
author | meillo@marmaro.de |
---|---|
date | Tue, 19 Jun 2007 17:44:28 +0200 |
parents | 20c0116dcb97 |
children |
line wrap: on
line source
class Leaf implements IComponent { private String id; public Leaf(String id) { this.id = id; } public String toString() { return this.id; } public Collection getChildren() { return null; } // false because failed to add public boolean addComponent(IComponent c) { return false; } // false because failed to find it for removal public boolean removeComponent(IComponent c) { return false; } }