-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDevice.java
40 lines (33 loc) · 1022 Bytes
/
Device.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
package com.example.android.bluetoothchat;
import java.util.ArrayList;
/**
* Created by mitch on 10/16/2016.
*/
public class Device {
private ArrayList<String> conversation;
private String deviceName;
private String connectedDeviceName;
public Device (String name, String connectedDevice){
deviceName = name;
connectedDeviceName = connectedDevice;
conversation = new ArrayList<>();
}
public Device(ArrayList<String> a, String name, String connectedDevice){
this(name, connectedDevice);
for(int i = 0; i < a.size(); i++){
conversation.add(a.get(i));
}
}
public void addConversation(String message){
conversation.add(message);
}
public ArrayList<String> getConversation() {
return conversation;
}
public String getDeviceName() {
return deviceName;
}
public String getConnectedDeviceName() {
return connectedDeviceName;
}
}