public class Choice extends Object implements ListBehavior<Group>, PercentageBehavior
| Constructor and Description |
|---|
Choice(String id)
Constructeur
|
Choice(String id,
String name)
Constructeur
|
| Modifier and Type | Method and Description |
|---|---|
void |
addGroup(String idGroup,
double weight)
addGroup : Ajout d'un groupe lié au choix
|
Group |
getGroup(String idGroup)
getGroup : Renvoie un groupe existant dans la map
|
List<Group> |
getGroups()
getGroups : Renvoie la map des groupes
|
String |
getIdChoice()
getId : Renvoie l'identifiant du choix
|
String |
getName()
getName : Renvoie le nom du choix
|
double |
getValue()
getValue : Renvoie la valeur du choix
|
List<Group> |
list() |
void |
setValue(double value)
setValue : Mise à jour de la valeur du choix
|
String |
toString() |
double |
value() |
public Choice(String id)
id - : identifiant du choixpublic void setValue(double value)
value - : nouvelle valeurpublic double getValue()
public String getIdChoice()
public String getName()
public List<Group> getGroups()
public void addGroup(String idGroup, double weight)
weight - : poids du groupe dans le sondageidGroup - : identifiant du groupepublic Group getGroup(String idGroup)
idGroup - : identifiant du groupe dans la mappublic double value()
value in interface PercentageBehaviorpublic List<Group> list()
list in interface ListBehavior<Group>Copyright © 2009-2012 CodeLutin. All Rights Reserved.