-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathAgent.java
More file actions
31 lines (26 loc) · 782 Bytes
/
Agent.java
File metadata and controls
31 lines (26 loc) · 782 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
import java.util.HashMap;
import java.util.Map;
public class Agent {
private String agentId;
private String agentName;
private Map<String, String> allocatedData;
public Agent(String agentId, String agentName) {
this.agentId = agentId;
this.agentName = agentName;
this.allocatedData = new HashMap<>();
}
public String getAgentId() {
return agentId;
}
public void allocateData(String data, String alteration) {
allocatedData.put(data, alteration);
}
@Override
public String toString() {
return "Agent{" +
"agentId='" + agentId + '\'' +
", agentName='" + agentName + '\'' +
", allocatedData=" + allocatedData +
'}';
}
}