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.paradoxalarm.internal.model;
15 import java.util.Date;
17 import org.slf4j.Logger;
18 import org.slf4j.LoggerFactory;
21 * The {@link Version} This class holds version information
23 * @author Konstantin Polihronov - Initial contribution
25 public class Version {
26 private final Logger logger = LoggerFactory.getLogger(Version.class);
29 private Byte revision;
31 private Date buildTime;
33 public Version(Byte version, Byte revision) {
34 this(version, revision, null);
37 public Version(Byte version, Byte revision, Byte build) {
38 this(version, revision, build, null);
41 public Version(Byte version, Byte revision, Byte build, Date buildTime) {
42 this.version = version;
43 this.revision = revision;
45 this.buildTime = buildTime;
46 logger.debug("version={}", this);
49 public Byte getVersion() {
53 public void setVersion(Byte version) {
54 this.version = version;
57 public Byte getRevision() {
61 public void setRevision(Byte revision) {
62 this.revision = revision;
65 public Byte getBuild() {
69 public void setBuild(Byte build) {
73 public Date getBuildTime() {
77 public void setBuildTime(Date buildTime) {
78 this.buildTime = buildTime;
82 public String toString() {
83 StringBuilder sb = new StringBuilder();
84 sb.append("Version: ");
92 if (buildTime != null) {