]> git.basschouten.com Git - openhab-addons.git/blob
46edadca569f39116f573025204a750b001e2c33
[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.digitalstrom.internal.lib.structure.devices.deviceparameters.constants;
14
15 import java.util.Arrays;
16 import java.util.List;
17
18 /**
19  * The {@link MeteringTypeEnum} lists all available digitalSTROM metering types.
20  *
21  * @author Alexander Betker - Initial contribution
22  * @author Michael Ochel - add MeteringUnitEnum list
23  * @author Matthias Siegele - add MeteringUnitEnum list
24  */
25 public enum MeteringTypeEnum {
26     ENERGY(Arrays.asList(MeteringUnitsEnum.WH, MeteringUnitsEnum.WS)),
27     // currently null by request getLast
28     // energyDelta(Lists.newArrayList(MeteringUnitsEnum.Wh, MeteringUnitsEnum.Ws)),
29     CONSUMPTION(Arrays.asList(MeteringUnitsEnum.WH));
30
31     private final List<MeteringUnitsEnum> meteringUnits;
32
33     private MeteringTypeEnum(List<MeteringUnitsEnum> meteringUnits) {
34         this.meteringUnits = meteringUnits;
35     }
36
37     /**
38      * Returns the available units as {@link List} for this {@link MeteringTypeEnum}.
39      *
40      * @return units
41      */
42     public List<MeteringUnitsEnum> getMeteringUnitList() {
43         return meteringUnits;
44     }
45 }