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.velbus.internal;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
18 * The {@link VelbusClockAlarmConfiguration} represents a class that contains the configuration of a velbus clock alarm.
20 * @author Cedric Boon - Initial contribution
23 public class VelbusClockAlarmConfiguration {
24 private VelbusClockAlarm alarmClock1;
25 private VelbusClockAlarm alarmClock2;
27 public VelbusClockAlarmConfiguration() {
28 this.alarmClock1 = new VelbusClockAlarm();
29 this.alarmClock2 = new VelbusClockAlarm();
32 public VelbusClockAlarm getAlarmClock1() {
36 public VelbusClockAlarm getAlarmClock2() {
40 public VelbusClockAlarm getAlarmClock(int alarmNumber) {
41 if (alarmNumber == 1) {
42 return getAlarmClock1();
43 } else if (alarmNumber == 2) {
44 return getAlarmClock2();
46 throw new IllegalArgumentException("The alarm clock '" + alarmNumber + "' does not exist.");