Made LogEntry#data a Map<String, Object>

This commit is contained in:
Florian CUNY 2019-01-03 13:33:46 +01:00
parent 265afaf345
commit 0b62c7cf76
2 changed files with 5 additions and 5 deletions

View File

@ -13,15 +13,15 @@ import java.util.Map;
public class LogEntry {
private long timestamp;
private String type;
private Map<String, String> data;
private Map<String, Object> data;
public LogEntry(String type, Map<String, String> data) {
public LogEntry(String type, Map<String, Object> data) {
this.timestamp = System.currentTimeMillis();
this.type = type;
this.data = data;
}
public LogEntry(long timestamp, String type, Map<String, String> data) {
public LogEntry(long timestamp, String type, Map<String, Object> data) {
this.timestamp = timestamp;
this.type = type;
this.data = data;
@ -35,7 +35,7 @@ public class LogEntry {
return type;
}
public Map<String, String> getData() {
public Map<String, Object> getData() {
return data;
}
}

View File

@ -42,7 +42,7 @@ public class LogEntryListAdapter implements AdapterInterface<List<LogEntry>, Lis
for (Map<String, Object> entry : serialized) {
long timestamp = (long) entry.get(TIMESTAMP);
String type = (String) entry.get(TYPE);
Map<String, String> data = (Map<String, String>) entry.get(DATA);
Map<String, Object> data = (Map<String, Object>) entry.get(DATA);
result.add(new LogEntry(timestamp, type, data));
}