- }
-
- private void multiMapPut(Map<String, Map<String, EiJob>> multiMap, String key, EiJob value) {
- multiMap.computeIfAbsent(key, k -> new HashMap<>()).put(value.id(), value);
- }
-
- private void multiMapRemove(Map<String, Map<String, EiJob>> multiMap, String key, EiJob value) {
- Map<String, EiJob> map = multiMap.get(key);
- if (map != null) {
- map.remove(value.id());
- if (map.isEmpty()) {
- multiMap.remove(key);
- }
- }
- }
-
- private Collection<EiJob> multiMapGet(Map<String, Map<String, EiJob>> multiMap, String key) {
- Map<String, EiJob> map = multiMap.get(key);
- if (map == null) {
- return Collections.emptyList();
- }
- return new Vector<>(map.values());