org.chorem.pollen.votecounting.utils
Class Utils
java.lang.Object
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()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Utils
public Utils()
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 sourcecalculate - : condition pour calculer ou non le nombre de sous
éléments
- Returns:
- nombre de sous éléments
Copyright © 2009 CodeLutin. All Rights Reserved.