1: // @author Frank M. Carrano, Timothy M. Henry
2: // @version 5.0
3: public T getEntry(int givenPosition)
4: {
5: if ((givenPosition >= 1) && (givenPosition <= numberOfEntries))
6: {
7: // Assertion: !isEmpty()
8: return getNodeAt(givenPosition).getData();
9: }
10: else
11: throw new IndexOutOfBoundsException(
12: "Illegal position given to getEntry operation.");
13: } // end getEntry