]> git.basschouten.com Git - openhab-addons.git/blob
c58b015a506e7129aca963563c03b63d76c5e074
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2024 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
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
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.insteon.internal.utils;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16
17 /**
18  * Generic pair class.
19  *
20  * @author Daniel Pfrommer - Initial contribution
21  * @author Rob Nielsen - Port to openHAB 2 insteon binding
22  */
23 @NonNullByDefault
24 public class Pair<K, V> {
25     private K key;
26     private V value;
27
28     /**
29      * Constructs a new <code>Pair</code> with a given key/value
30      *
31      * @param key the key
32      * @param value the value
33      */
34     public Pair(K key, V value) {
35         this.key = key;
36         this.value = value;
37     }
38
39     public K getKey() {
40         return key;
41     }
42
43     public V getValue() {
44         return value;
45     }
46 }