1
2
3
4
5
6
7
8
9
10
11 package psiprobe.model;
12
13 import java.util.Collections;
14 import java.util.HashMap;
15 import java.util.Map;
16
17
18
19
20 public class TransportableModel {
21
22
23 private Map<String, Object> items = new HashMap<>();
24
25
26
27
28
29
30 public Map<String, Object> getItems() {
31 return items == null ? Collections.emptyMap() : new HashMap<>(items);
32 }
33
34
35
36
37
38
39 public void setItems(Map<String, Object> items) {
40 this.items = items == null ? Collections.emptyMap() : new HashMap<>(items);
41 }
42
43
44
45
46
47
48 public void putAll(Map<String, Object> map) {
49 if (map != null) {
50 items.putAll(new HashMap<>(map));
51 }
52 }
53
54 }