public boolean hasSubModule(long id) { boolean hasSubModule = false; for (Module subModule : subModules) { if (subModule.getId() == id || subModule.hasSubModule(id)) { hasSubModule = true; } } return hasSubModule; }
public boolean hasSubModule(String name) { boolean hasSubModule = false; for (Module subModule : subModules) { if (subModule.getName().equals(name) || subModule.hasSubModule(name)) { hasSubModule = true; } } return hasSubModule; }