Mercurial > docs > DesignPatterns
view code/composite-leaf.java @ 37:debbd3bf76ce default tip
Added tag Ausarbeitung final for changeset f03413250b39d73ca44b22ea1e4022fd3c9e825d
author | meillo@marmaro.de |
---|---|
date | Sat, 11 Aug 2007 22:43:34 +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; } }