-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathImage.java
More file actions
119 lines (102 loc) · 2.05 KB
/
Copy pathImage.java
File metadata and controls
119 lines (102 loc) · 2.05 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
package model;
/**
* Class allowing the representation of an image
*
* @author joel yepgang
*/
public class Image {
private int id;
private String location;
private String type;
private String name;
/**
* constructor
* @param id the id of card image
* @param location the location of an image
* @param type the type
* @param name the name of an image
*/
public Image(int id, String location, String type, String name) {
this.id = id;
this.location = location;
this.type = type;
this.name = name;
}
/**
* @return the id
*/
public int getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(int id) {
this.id = id;
}
/**
* @return the location
*/
public String getLocation() {
return location;
}
/**
* @param location the location to set
*/
public void setLocation(String location) {
this.location = location;
}
/**
* @return the type
*/
public String getType() {
return type;
}
/**
* @param type the type to set
*/
public void setType(String type) {
this.type = type;
}
/**
* @return the name
*/
public String getName() {
return name;
}
/**
* @param name the name to set
*/
public void setName(String name) {
this.name = name;
}
/**
* This method compares the value of two instances.
* @param obj
*/
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Image other = (Image) obj;
if (id != other.id)
return false;
if (type == null) {
if (other.type != null)
return false;
} else if (!type.equals(other.type))
return false;
return true;
}
/**
*
* this method makes it possible to obtain a set of information on an image
* corresponding to a map on a carpet
*/
public String toString() {
return "Image information : " + " " + id + " " + location + " " + type + " " + name;
}
}