2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
7 * This program and the accompanying materials are made available under the
8 * terms of the Eclipse Public License 2.0 which is available at
9 * http://www.eclipse.org/legal/epl-2.0
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.plugwiseha.internal.api.model.dto;
15 import java.util.Collection;
16 import java.util.HashMap;
21 * @author B. van Wetten - Initial contribution
23 public abstract class PlugwiseHACollection<T> implements Map<String, T> {
25 private final Map<String, T> map = new HashMap<>();
29 return this.map.size();
33 public boolean isEmpty() {
34 return this.map.isEmpty();
38 public boolean containsKey(Object key) {
39 return this.map.containsKey(key);
43 public boolean containsValue(Object value) {
44 return this.map.containsValue(value);
48 public T get(Object key) {
49 return this.map.get(key);
53 public T put(String key, T value) {
54 return this.map.put(key, value);
58 public T remove(Object key) {
59 return this.map.remove(key);
63 public void putAll(Map<? extends String, ? extends T> m) {
73 public Set<String> keySet() {
74 return this.map.keySet();
78 public Collection<T> values() {
79 return this.map.values();
83 public Set<Entry<String, T>> entrySet() {
84 return this.map.entrySet();
87 public abstract void merge(Map<String, T> map);