-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathChatMessage.java
More file actions
32 lines (27 loc) · 832 Bytes
/
ChatMessage.java
File metadata and controls
32 lines (27 loc) · 832 Bytes
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
import java.io.Serializable;
final class ChatMessage implements Serializable {
private static final long serialVersionUID = 6898543889087L;
// Types of messages
static final int MESSAGE = 0, LOGOUT = 1, DM = 2, LIST = 3, TICTACTOE = 4;
// Here is where you should implement the chat message object.
// Variables, Constructors, Methods, etc.
private int type;
private String message;
private String recipient;
public ChatMessage(int type, String message,String recipient)
{
this.type=type;
this.message=message;
this.recipient=recipient;
}
public int getType()
{
return type;
}
public String getMessage() {
return message;
}
public String getRecipient() {
return recipient;
}
}