1: // @author Frank M. Carrano, Timothy M. Henry
2: // @version 5.0
3: public boolean contains(T anEntry)
4: {
5: Node currentNode = firstNode;
7: while ( (currentNode != null) &&
8: (anEntry.compareTo(currentNode.getData()) > 0) )
9: {
10: currentNode = currentNode.getNextNode();
11: } // end while
13: return (currentNode != null) &&
14: anEntry.equals(currentNode.getData());
15: } // end contains