Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public boolean add(Topic topic) {
- if (topic == null) {
- return false;
- }
- if (!contains(topic)) {
- InterestListElem newElem = new InterestListElem(topic);
- + // newElem weight muss auf 1 gesetzt werden
- + // -0.5p
- if (first != null) {
- newElem.setNext(first);
- }
- first = newElem;
- return true;
- } else {
- find(topic).increaseWeight(1);
- return false;
- }
- }
Add Comment
Please, Sign In to add comment