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 2615 2009-07-01 13:47:45Z nrannou $

Constructor Summary
Utils()
           
 
Method Summary
static int calculateNbSubElements(java.util.List<ListBehavior<java.lang.Object>> list)
          Calcul le nombre de sous éléments d'une liste Les éléments du vecteur doivent implémenter l'interface ListBehavior
static double calculatePercentage(PercentageBehavior in, java.util.List<PercentageBehavior> list)
           
static int mayCalculateSubElements(java.util.List<ListBehavior<java.lang.Object>> list, boolean calculate)
          Calcul le nombre de sous éléments d'une liste sous condition
 
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)

calculateNbSubElements

public static int calculateNbSubElements(java.util.List<ListBehavior<java.lang.Object>> list)
Calcul le nombre de sous éléments d'une liste Les éléments du vecteur doivent implémenter l'interface ListBehavior

Parameters:
list - : liste source
Returns:
nombre de sous éléments

mayCalculateSubElements

public static int mayCalculateSubElements(java.util.List<ListBehavior<java.lang.Object>> list,
                                          boolean calculate)
Calcul le nombre de sous éléments d'une liste sous condition

Parameters:
list - : liste source
calculate - : condition pour calculer ou non le nombre de sous éléments
Returns:
nombre de sous éléments


Copyright © 2009 CodeLutin. All Rights Reserved.