-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathChatMessage.java
More file actions
34 lines (30 loc) · 1.17 KB
/
ChatMessage.java
File metadata and controls
34 lines (30 loc) · 1.17 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
package com.example;
public class ChatMessage {
private final String id;
private final String username;
private final String message;
private final String timestamp;
private final String fileName;
private final String fileUrl;
private final String mimeType;
public ChatMessage(String id, String username, String message, String timestamp,
String fileName, String fileUrl, String mimeType) {
this.id = id;
this.username = username;
this.message = message;
this.timestamp = timestamp;
this.fileName = fileName;
this.fileUrl = fileUrl;
this.mimeType = mimeType;
}
public ChatMessage(String id, String username, String message, String timestamp) {
this(id, username, message, timestamp, null, null, null);
}
public String getId() { return id; }
public String getUsername() { return username; }
public String getMessage() { return message; }
public String getTimestamp() { return timestamp; }
public String getFileName() { return fileName; }
public String getFileUrl() { return fileUrl; }
public String getMimeType() { return mimeType; }
}