org.chorem.pollen.votecounting.utils
Class Utils

java.lang.Object
  extended by org.chorem.pollen.votecounting.utils.Utils

public class Utils
extends Object

Classe utilitaire pour les algorithmes de dépouillement.

Version:
$Id: Utils.java 3423 2012-06-05 16:50:22Z tchemit $

Constructor Summary
Utils()
           
 
Method Summary
static int calculateNbVotes(List list, boolean byGroup)
          Calcul le nombre de votes d'une liste
static double calculatePercentage(PercentageBehavior in, List<PercentageBehavior> list)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Utils

public Utils()
Method Detail

calculatePercentage

public static double calculatePercentage(PercentageBehavior in,
                                         List<PercentageBehavior> list)

calculateNbVotes

public static int calculateNbVotes(List list,
                                   boolean byGroup)
Calcul le nombre de votes d'une liste

Parameters:
list - : liste d'éléments (doivent impléméntés ObjectWithList)
byGroup - : condition sur le calcul
Returns:
nombre de votes


Copyright © 2009-2012 CodeLutin. All Rights Reserved.