2 * Copyright (c) 2010-2020 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.homematic.internal.model;
15 import org.apache.commons.lang.builder.ToStringBuilder;
16 import org.apache.commons.lang.builder.ToStringStyle;
19 * Configuration object for sending a datapoint.
21 * @author Gerhard Riegler - Initial contribution
23 public class HmDatapointConfig {
25 private Double receiveDelay;
28 * Returns the delay in seconds for sending the datapoint.
30 public double getDelay() {
31 return delay == null ? 0.0 : delay;
35 * Sets the delay in seconds for sending the datapoint.
37 public void setDelay(Double delay) {
42 * Returns the delay in seconds for receiving a new datapoint event.
44 public Double getReceiveDelay() {
45 return receiveDelay == null ? 0.0 : receiveDelay;
49 * Sets the delay in seconds for receiving a datapoint event.
51 public void setReceiveDelay(Double receiveDelay) {
52 this.receiveDelay = receiveDelay;
56 public String toString() {
57 return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("delay", delay)
58 .append("receiveDelay", receiveDelay).toString();