-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathAlbum.java
More file actions
84 lines (65 loc) · 1.69 KB
/
Album.java
File metadata and controls
84 lines (65 loc) · 1.69 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
import java.util.Vector;
public class Album {
private String name;
private String login;
private String total;
private String id;
private final Vector<String> images = new Vector<String>();
private boolean initiated = false;
public Album(){}
public Album(String name, String total, String id) {
this.name = name;
this.total = total;
this.id = id;
}
public boolean isInitiated() {
return this.initiated;
}
public Vector<String> getImages() {
return this.images;
}
public void addImage(String image) {
this.images.add(image);
this.initiated = true;
}
/*
what the list will show
*/
public String toString() {
if (this.id != null) {
return "<html><b>" + this.name + "</b> (" + this.id + ") von <b>"+ this.login +"</b> mit <b>"+ this.total +"</b> bildern</html>";
} else {
return "";
}
}
public String getId() {
return this.id;
}
public void setId(String id) {
this.id = id;
}
public String getLogin() {
return this.login;
}
public void setLogin(String login) {
this.login = login;
}
public String getTotal() {
return this.total;
}
public void setTotal(String total) {
this.total = total;
}
public int getCount() {
return this.images.size();
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
public String getInfoString() {
return this.id + ":" + this.name + ", " + this.initiated + ", #=" + this.getCount();
}
}