Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Searches the current list for a given topic.
- *
- * @param topic
- * The topic the list shall be searched for. It is assumed
- * that the given topic is not null.
- * @return
- */
- public InterestListElem searchInterest(Topic topic) {
- InterestListElem currentElem = this;
- do {
- if (currentElem.getInterest() == topic) {
- return currentElem;
- }
- currentElem = currentElem.getNext();
- } while (currentElem.getNext() != null);
- return null;
- }
Add Comment
Please, Sign In to add comment