Source of 11.13.java


  1: // @author Frank M. Carrano, Timothy M. Henry
  2: // @version 5.0
  3: public boolean contains(T anEntry)
  4: {
  5:    checkIntegrity();
  6:    boolean found = false;
  7:    int index = 1;
  8:    while (!found && (index <= numberOfEntries))
  9:    {
 10:       if (anEntry.equals(list[index]))
 11:          found = true;
 12:       index++;
 13:    } // end while
 14:    return found;
 15: } // end contains