Example #1
0
 /**
  * Remove child {@link Entity}.
  *
  * @param child Child entity.
  * @return {@code true} if Successfully removed. Otherwise {@code false}.
  */
 public boolean remove(Entity child) {
   final boolean removed = children.remove(child);
   if (removed) {
     child.parent = null;
   }
   return removed;
 }
Example #2
0
 /**
  * Add child {@link Entity}.
  *
  * @param child Child entity.
  * @return {@code true} if Successfully added. Otherwise {@code false}.
  */
 public boolean add(Entity child) {
   final boolean added = children.add(child);
   if (added) {
     child.parent = this;
     child.setApp(app);
   }
   return added;
 }