-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBeacon.java
65 lines (61 loc) · 1.32 KB
/
Beacon.java
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
import java.io.Serializable;
public class Beacon implements Serializable {
public int ID;
public int StartUpTime;
public String CmdAgentID;
private long timestamp;
public Beacon(int ID, int StartUpTime, String CmdAgentID, long timestamp)
{
this.ID=ID;
this.StartUpTime=StartUpTime;
this.CmdAgentID=CmdAgentID;
this.timestamp=timestamp;
}
public String toString() {
return ("ID:"+this.getID()+
" Startuptime: "+ this.getStartUpTime() +
" cmdAgentID: "+ this.getCmdAgentID() +
" lastSignalTime : " + this.getLastSignalTime());
}
@Override
public boolean equals(Object o)
{
Beacon b=(Beacon) o;
if((this.getID()==b.getID()))
return true;
else
return false;
}
public void setID(int ID)
{
this.ID=ID;
}
public int getID()
{
return ID;
}
public void setstartUpTime(int StartUpTime)
{
this.StartUpTime=StartUpTime;
}
public int getStartUpTime()
{
return StartUpTime;
}
public void setCmdAgentID(String CmdAgentID)
{
this.CmdAgentID=CmdAgentID;
}
public String getCmdAgentID()
{
return CmdAgentID;
}
public void setlastSignaltime(long lastSignalTime)
{
this.timestamp=lastSignalTime;
}
public long getLastSignalTime()
{
return timestamp;
}
}