-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMessage.java
executable file
·41 lines (36 loc) · 1.13 KB
/
Message.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
import java.io.Serializable;
import java.util.ArrayList;
public class Message implements Serializable{
private static final long serialVersionUID = 4L; //🔪
public static final int MSG_HDR_CHAT = 0;
public static final int MSG_HDR_NAME = 1;
public static final int MSG_HDR_SUBMITNAME = 2;
public static final int MSG_HDR_WELCOME = 3;
public static final int MSG_HDR_EXIT = 4;
public static final int MSG_HDR_PCHAT = 5;
public static final int MSG_HDR_RPS = 6;
public static final int MSG_HDR_RPSRESULT = 7;
public static final int MSG_HDR_QUIT = 8;
private int header;
private ArrayList<String> targets;
private String content;
private String sender;
public Message(int header, ArrayList<String> targets, String sender, String content) {
this.header = header;
this.targets = targets;
this.content = content;
this.sender = sender;
}
public int getHeader() {
return header;
}
public ArrayList<String> getTargets() {
return targets;
}
public String getContent() {
return content;
}
public String getSender() {
return sender;
}
}