Je suis sous Eclipse, tiens voila ce que je viens de faire, j'ai cru comprendre qu'il fallait faire ça non ?
Maintenant je peux faire appel à la fonction .getValeur et .get Horaire, mais je n'ai pas encore testé
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46 import java.util.ArrayList; import java.util.List; public class TableauFormule { private final ArrayList<TableEntry> values; private int valeur; public final String horaire; public TableauFormule() { this.values = new ArrayList<TableEntry>(); this.valeur = getValeur(); this.horaire = getHoraire(); } public void addVal(String NomStat, String Descrip, String Date, int Valeur){ final TableEntry entry = new TableEntry(NomStat, Descrip, Date, Valeur); this.values.add(entry); } public int getValeur(){ return valeur; } public String getHoraire() { return horaire; } public final class TableEntry { /** Name of the variable */ public final String variable; /** Description de la stat */ public final String description; /** Tranche horaire */ public final String horaire; /** Valeur **/ public final int valeur; public TableEntry(String variable, String description, String horaire, int valeur) { this.variable = variable; this.description = description; this.horaire = horaire; this.valeur = valeur; } } }





Répondre avec citation



Partager