1: /** Tests whether this bag contains a given entry.
2: @param anEntry The entry to locate.
3: @return True if this bag contains anEntry, or false otherwise. */
4: public boolean contains(T anEntry)
5: {
6: checkInitialization();
7: return getIndexOf(anEntry) > -1; // or >= 0
8: } // end contains