Example #1
0
 public boolean contains(final String name) {
   for (final CategoryItem child : children) {
     if (child.getName().equals(name)) {
       return true;
     }
   }
   return false;
 }
Example #2
0
 public void removeChildren(final String name) {
   for (int i = 0; i < children.size(); i++) {
     final CategoryItem child = children.get(i);
     if (child.getName().equals(name)) {
       children.remove(i);
       break;
     }
   }
 }