diff --git a/src/main/java/fr/imirhil/april/hebdobot/review/CollectiveTopic.java b/src/main/java/fr/imirhil/april/hebdobot/review/CollectiveTopic.java index 505e3bb..4557828 100644 --- a/src/main/java/fr/imirhil/april/hebdobot/review/CollectiveTopic.java +++ b/src/main/java/fr/imirhil/april/hebdobot/review/CollectiveTopic.java @@ -20,7 +20,6 @@ package fr.imirhil.april.hebdobot.review; import java.util.HashSet; -import java.util.LinkedList; import java.util.List; import java.util.Set; @@ -29,7 +28,7 @@ import java.util.Set; */ public class CollectiveTopic extends Topic { - private final List messages = new LinkedList(); + private final Messages messages = new Messages(); /** * Instantiates a new collective topic. diff --git a/src/main/java/fr/imirhil/april/hebdobot/review/IndividualTopic.java b/src/main/java/fr/imirhil/april/hebdobot/review/IndividualTopic.java index a637b14..4387f65 100644 --- a/src/main/java/fr/imirhil/april/hebdobot/review/IndividualTopic.java +++ b/src/main/java/fr/imirhil/april/hebdobot/review/IndividualTopic.java @@ -20,8 +20,6 @@ package fr.imirhil.april.hebdobot.review; import java.util.HashMap; -import java.util.LinkedList; -import java.util.List; import java.util.Map; import java.util.Set; @@ -30,7 +28,7 @@ import java.util.Set; */ public class IndividualTopic extends Topic { - private final Map> messages = new HashMap>(); + private final Map messages = new HashMap(); /** * Instantiates a new individual topic. @@ -52,7 +50,7 @@ public class IndividualTopic extends Topic final String author = message.getAuthor(); if (!this.messages.containsKey(author)) { - this.messages.put(author, new LinkedList()); + this.messages.put(author, new Messages()); } this.messages.get(author).add(message); } @@ -64,7 +62,7 @@ public class IndividualTopic extends Topic * the author * @return the messages */ - public List getMessages(final String author) + public Messages getMessages(final String author) { return this.messages.get(author); } diff --git a/src/main/java/fr/imirhil/april/hebdobot/review/Messages.java b/src/main/java/fr/imirhil/april/hebdobot/review/Messages.java new file mode 100644 index 0000000..90ed7d5 --- /dev/null +++ b/src/main/java/fr/imirhil/april/hebdobot/review/Messages.java @@ -0,0 +1,37 @@ +/** + * Copyright (C) 2017 Christian Pierre MOMON + * + * This file is part of (April) Hebdobot. + * + * Hebdobot is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Hebdobot is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Hebdobot. If not, see + */ +package fr.imirhil.april.hebdobot.review; + +import java.util.LinkedList; + +/** + * The Class MessageLinkedList. + */ +public class Messages extends LinkedList +{ + private static final long serialVersionUID = -4092193002518826252L; + + /** + * Instantiates a new messages. + */ + public Messages() + { + super(); + } +} diff --git a/src/main/java/fr/imirhil/april/hebdobot/review/Review.java b/src/main/java/fr/imirhil/april/hebdobot/review/Review.java index e6bb250..c6033f9 100644 --- a/src/main/java/fr/imirhil/april/hebdobot/review/Review.java +++ b/src/main/java/fr/imirhil/april/hebdobot/review/Review.java @@ -58,7 +58,7 @@ public class Review this.participants = new HashSet(); this.individualTopics = new LinkedList(); this.collectiveTopics = new LinkedList(); - this.messages = new LinkedList(); + this.messages = new Messages(); this.owner = owner; }