@Override public void removeEmptyItems() { for (int i = 0; i < myList.myLength; i++) { GameElement e = myList.get(i); if (e.shouldBeRemoved()) myList.remove(e); } }
@Override public boolean update(float timeDelta, Updateable parent) { for (int i = 0; i < myList.myLength; i++) { if (!myList.get(i).update(timeDelta, this)) { Log.w( LOG_TAG, "Removing " + myList.get(i) + " from list because it returned" + " false on update()"); myList.remove(myList.get(i)); } } return true; }
@Override public boolean remove(T item) { mySearchIndex.remove(item.myName); return myList.remove(item); }
public boolean remove(String uniqueName) { GameElement itemToDelete = mySearchIndex.get(uniqueName); mySearchIndex.remove(uniqueName); return myList.remove(itemToDelete); }
@Override public boolean remove(Command x) { return myList.remove(x); }