Composite ãã¿ã¼ã³ãç¨ãã¦ãã£ã¬ã¯ããªæ§é ã表ãJavaããã°ã©ã ã®ä¾ã示ãã ãã®ããã°ã©ã ã¯ã æã表ãã¯ã©ã¹Â : Folderã¯ã©ã¹ èã表ãã¯ã©ã¹Â : Fileã¯ã©ã¹ å ±éã¤ã³ã¿ãã§ã¼ã¹Â : FileInterfaceã¤ã³ã¿ãã§ã¼ã¹ å®è¡ä¾ã示ãããã®ã¯ã©ã¹Â : DirectoryUserã¯ã©ã¹ ããæ§æãããã import java.util.ArrayList; import java.util.List; interface FileInterface { public void defaultMethod(int depth); public List<FileInterface> getChildren(); public boolean addComponent(FileInterface c); public boolean removeComponent
{{#tags}}- {{label}}
{{/tags}}