org.chorem.pollen.votecounting.utils
Class Utils

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

public class Utils
extends java.lang.Object

Classe utilitaire pour les algorithmes de dépouillement.

Version:
$Id: Utils.java 2836 2010-01-11 12:46:59Z schorlet $

Constructor Summary
Utils()
           
 
Method Summary
static int calculateNbVotes(java.util.List list, boolean byGroup)
          Calcul le nombre de votes d'une liste
static double calculatePercentage(PercentageBehavior in, java.util.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,
                                         java.util.List<PercentageBehavior> list)

calculateNbVotes

public static int calculateNbVotes(java.util.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-2010 CodeLutin. All Rights Reserved.