]> git.basschouten.com Git - openhab-addons.git/blob
f5d9d91bb417d98546cda5a9d21cf6d4eb75cccf
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 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.ecobee.internal.function;
14
15 import java.text.DateFormat;
16 import java.text.SimpleDateFormat;
17 import java.util.HashMap;
18 import java.util.Map;
19
20 import org.eclipse.jdt.annotation.NonNullByDefault;
21
22 import com.google.gson.annotations.Expose;
23
24 /**
25  * The {@link AbstractFunction} defines the base class used by all
26  * thermostat functions.
27  *
28  * @author Mark Hilbush - Initial contribution
29  */
30 @NonNullByDefault
31 public abstract class AbstractFunction {
32
33     @Expose(serialize = false)
34     protected static final DateFormat YMD = new SimpleDateFormat("yyyy-MM-dd");
35
36     @Expose(serialize = false)
37     protected static final DateFormat HMS = new SimpleDateFormat("HH:mm:ss");
38
39     public String type;
40
41     public Map<String, Object> params;
42
43     public AbstractFunction(String type) {
44         this.type = type;
45         this.params = new HashMap<>();
46     }
47 }