1: /** Removes one occurrence of a given entry from this bag.
2: @param anEntry The entry to be removed.
3: @return True if the removal was successful, or false if not. */
4: public boolean remove(T anEntry)
5: {
6: checkInitialization();
7: int index = getIndexOf(anEntry);
8: T result = removeEntry(index);
9:
10: return anEntry.equals(result);
11: } // end remove