private String getLabel(IBrand b) { StringBuilder sb = new StringBuilder(); IBrand parent = b.getParent(); while (parent != null) { sb.append(" "); parent = parent.getParent(); } sb.append(b.getName()); return sb.toString(); }
private void addBrand(IBrand b) { brands.add(b); for (IBrand c : b.getChildBrands()) addBrand(c); }