blob: 6bf807a376254b63ad8619569e4429c2886b2586 (
plain)
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
|
package cgeo.geocaching;
import cgeo.geocaching.enumerations.LogType;
import java.util.List;
public class cgLog {
public int id = 0;
public LogType type = LogType.LOG_NOTE; // note
public String author = "";
public String log = "";
public long date = 0;
public int found = -1;
/** Friend's logentry */
public boolean friend = false;
public List<cgImage> logImages = null;
public String cacheName = ""; // used for trackables
public String cacheGuid = ""; // used for trackables
@Override
public int hashCode() {
return (int) date * type.hashCode() * author.hashCode() * log.hashCode();
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final cgLog otherLog = (cgLog) obj;
return date == otherLog.date &&
type == otherLog.type &&
author.compareTo(otherLog.author) == 0 &&
log.compareTo(otherLog.log) == 0 ? true : false;
}
}
|