Subversion Repositories eFlore/Applications.coel

Rev

Rev 156 | Rev 930 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 156 Rev 188
Line 10... Line 10...
10
	private ArrayList<String> messages = null;
10
	private ArrayList<String> messages = null;
11
	private ArrayList<Object> donnees = null;
11
	private ArrayList<Object> donnees = null;
Line 12... Line 12...
12
	
12
	
13
	public Information() {
13
	public Information() {
-
 
14
		messages = new ArrayList<String>();
14
		messages = new ArrayList<String>();
15
		donnees = new ArrayList<Object>();
Line 15... Line 16...
15
	}
16
	}
-
 
17
 
-
 
18
	public Information(String t) {
16
 
19
		donnees = new ArrayList<Object>();
17
	public Information(String t) {
20
		messages = new ArrayList<String>();
Line 18... Line 21...
18
		type = t;
21
		type = t;
-
 
22
	}
19
	}
23
	
20
	
24
	public Information(String t, String m) {
21
	public Information(String t, String m) {
25
		donnees = new ArrayList<Object>();
22
		messages = new ArrayList<String>();
26
		messages = new ArrayList<String>();
Line 23... Line 27...
23
		messages.add(m);
27
		messages.add(m);
-
 
28
		type = t;
24
		type = t;
29
	}
25
	}
30
	
26
	
31
	public Information(String t, JSONArray jsonArray) {
27
	public Information(String t, JSONArray jsonArray) {
32
		donnees = new ArrayList<Object>();
28
		messages = new ArrayList<String>();
33
		messages = new ArrayList<String>();
29
		for(int i = 0 ; i < jsonArray.size() ; i++) {
34
		for(int i = 0 ; i < jsonArray.size() ; i++) {
30
			if (jsonArray.get(i).isString() != null) {
35
			if (jsonArray.get(i).isString() != null) {
31
				messages.add(jsonArray.get(i).isString().stringValue());
36
				messages.add(jsonArray.get(i).isString().stringValue());
Line 32... Line 37...
32
			}
37
			}
-
 
38
		}
33
		}
39
		type = t;
34
		type = t;
40
	}
35
	}
41
 
36
 
42
	public Information(String t, Object o) {
Line 60... Line 66...
60
	}
66
	}
Line 61... Line 67...
61
	
67
	
62
	public void setDonnee(Object objet) {
68
	public void setDonnee(Object objet) {
63
		donnees.add(objet);
69
		donnees.add(objet);
-
 
70
	}
-
 
71
	public void setDonnee(int index, Object objet) {
-
 
72
		if (objet != null) {
-
 
73
			donnees.add(index, objet);
-
 
74
		}
64
	}
75
	}
-
 
76
	public Object getDonnee(int index) {
65
	public Object getDonnee(int index) {
77
		try {
-
 
78
			return donnees.get(index);
-
 
79
		} catch (Exception e) {
-
 
80
			return null;
66
		return donnees.get(index);
81
		}
Line 67... Line 82...
67
	}
82
	}
68
	
83
	
69
	public ArrayList<Object> getDonnees() {
84
	public ArrayList<Object> getDonnees() {