r3420 - trunk/pollen-votecounting/src/main/java/org/chorem/pollen/votecounting/business
Author: tchemit Date: 2012-06-04 14:37:46 +0200 (Mon, 04 Jun 2012) New Revision: 3420 Url: http://chorem.org/repositories/revision/pollen/3420 Log: fix javadoc Modified: trunk/pollen-votecounting/src/main/java/org/chorem/pollen/votecounting/business/Context.java Modified: trunk/pollen-votecounting/src/main/java/org/chorem/pollen/votecounting/business/Context.java =================================================================== --- trunk/pollen-votecounting/src/main/java/org/chorem/pollen/votecounting/business/Context.java 2012-06-04 09:06:56 UTC (rev 3419) +++ trunk/pollen-votecounting/src/main/java/org/chorem/pollen/votecounting/business/Context.java 2012-06-04 12:37:46 UTC (rev 3420) @@ -72,7 +72,7 @@ } /** - * Renvoie un choix de la map + * Renvoie un choix de la map. * * @param idChoice : identifiant du choix * @return choix @@ -121,7 +121,7 @@ /** * Ajout d'un nouveau choix au contexte * - * @param idChoice : identifiant du choix + * @param choice identifiant du choix */ public void addChoice(PollChoiceDTO choice) { this.choices.add(new Choice(choice.getIdChoice(), choice.getName())); @@ -130,7 +130,7 @@ /** * Ajout d'un nouveau choix au contexte * - * @param idChoice : identifiant du choix + * @param choice identifiant du choix */ public void addHiddenChoice(PollChoiceDTO choice) { this.hiddenChoices.add(new Choice(choice.getIdChoice(), choice.getName())); @@ -139,8 +139,8 @@ /** * Ajout d'un groupe pour l'ensemble des choix du contexte * - * @param idGroup : identifiant du groupe - * @param weight : poids du groupe + * @param idGroup identifiant du groupe + * @param weight poids du groupe */ public void addGroup(String idGroup, double weight) { for (Choice choice : this.choices) { @@ -155,22 +155,24 @@ * Test si le choix est un résultat d'après le contexte A utiliser après * dépouillement sinon aucun résultat * - * @param choice : choix à tester - * @return true si le choix est un résultat, false sinon + * @param choice choix à tester + * @return {@code true} si le choix est un résultat, {@code false} sinon. */ private boolean isChoiceResult(Choice choice) { + boolean result = false; for (Choice res : results) { if (choice.getIdChoice().equals(res.getIdChoice())) { - return true; + result = true; + break; } } - return false; + return result; } /** * Execution de la méthode de dépouillement et calcul des choix résultats * - * @return liste de choix résultats + * @return la liste de choix résultats */ public boolean executeCounting() {
participants (1)
-
tchemit@users.chorem.org