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
|
public class ListAlarme {
public final static int defaut = 1;
public final static int grave = 2;
public String idAlarme;
public String typeAlarme;
public int genre;
public ListAlarme(String aid, String atype, int aGenre) {
idAlarme = aid;
typeAlarme = atype;
genre = aGenre;
}
public static ArrayList<ListAlarme> getAListOfAlarms() {
ArrayList<ListAlarme> listAl = new ArrayList<ListAlarme>();
listAl.add(new ListAlarme("alarme1 ", "type1 ", defaut));
listAl.add(new ListAlarme("alarme2 ", "type2 ", grave));
listAl.add(new ListAlarme("alarme3 ", "type3 ", grave));
listAl.add(new ListAlarme("alarme4 ", "type4 ", defaut));
listAl.add(new ListAlarme("alarme5 ", "type5 ", defaut));
listAl.add(new ListAlarme("alarme6 ", "type6 ", grave));
listAl.add(new ListAlarme("alarme7 ", "type7 ", defaut));
listAl.add(new ListAlarme("alarme8 ", "type8 ", grave));
listAl.add(new ListAlarme("alarme9 ", "type9 ", grave));
listAl.add(new ListAlarme("alarme10", "type10", defaut));
listAl.add(new ListAlarme("alarme11", "type11", grave));
listAl.add(new ListAlarme("alarme12", "type12", grave));
listAl.add(new ListAlarme("alarme13", "type13", defaut));
listAl.add(new ListAlarme("alarme14", "type14", grave));
return listAl;
}
public String toString() {
return "id : "+idAlarme+", type : "+typeAlarme+", genre : "+genre+".";
}
} |
Partager