Guest User

Untitled

a guest
Apr 26th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.51 KB | None | 0 0
  1.         /**
  2.          * Searches the current list for a given topic.
  3.          *
  4.          * @param topic
  5.          *            The topic the list shall be searched for. It is assumed
  6.          *            that the given topic is not null.
  7.          * @return
  8.          */
  9.         public InterestListElem searchInterest(Topic topic) {
  10.             InterestListElem currentElem = this;
  11.             do {
  12.                 if (currentElem.getInterest() == topic) {
  13.                     return currentElem;
  14.                 }
  15.                 currentElem = currentElem.getNext();
  16.             } while (currentElem.getNext() != null);
  17.             return null;
  18.         }
Add Comment
Please, Sign In to add comment